/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 加载页面样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-container {
    text-align: center;
    color: white;
}

.logo {
    margin-bottom: 30px;
}

.logo i {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 转圈动画 */
.spinner {
    width: 60px;
    height: 60px;
    margin: 30px auto;
    position: relative;
}

.spinner-circle {
    width: 100%;
    height: 100%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.loading-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 头部样式 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    color: #1e3c72;
    font-size: 1.8rem;
}

.header h1 i {
    margin-right: 10px;
    color: #4a90e2;
}

.user-actions {
    display: flex;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #5e6ce0);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a7bc8, #4a5ad0);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: #f0f4f8;
    color: #4a90e2;
    border: 1px solid #dce6f5;
}

.btn-secondary:hover {
    background: #e1e9f5;
    transform: translateY(-2px);
}

/* 机器容器 */
.machines-container {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.monitoring-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 30px 30px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 2rem;
    color: #1e3c72;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
}

/* 机器卡片样式 */
.machine-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.machine-header {
    background: linear-gradient(135deg, #4a90e2, #5e6ce0);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.machine-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    margin: 0;
}

.machine-header h3 i {
    font-size: 1.2rem;
}

.machine-provider {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.machine-details {
    padding: 25px;
}

.detail-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-item strong {
    color: #1e3c72;
    display: inline-block;
    margin-bottom: 5px;
    min-width: 180px;
}

.detail-item ul {
    margin-top: 5px;
    padding-left: 20px;
}

.detail-item li {
    margin-bottom: 5px;
}

.detail-item a {
    color: #4a90e2;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

.machine-actions {
    padding: 20px 25px;
    background: #f9fbfd;
    text-align: right;
    border-top: 1px solid #eee;
}

/* 页脚样式 */
.footer {
    background: white;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .machine-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .detail-item strong {
        display: block;
        min-width: auto;
    }
    
    .machines-container {
        padding: 20px 15px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
}

/* 动画效果 */
.fade-out {
    opacity: 0;
    visibility: hidden;
}

.show-content {
    display: block !important;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 加载完成后的动画 */
.content-loaded {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮悬停效果 */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 链接样式 */
a {
    color: #4a90e2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}