* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    background-image: url('view-transparent-crystal-water.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    color: #1d1d1f;
    position: relative;
    overflow-x: hidden;
    animation: fadeInBackground 0.75s ease-in-out;
}

@keyframes fadeInBackground {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: #1d1d1f;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: #1d1d1f;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.card h3 {
    color: #1d1d1f;
    margin-bottom: 24px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
    letter-spacing: -0.01em;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.2;
    word-break: break-word;
    white-space: pre-line;
    letter-spacing: -0.01em;
}

.stat-label {
    font-size: 0.8rem;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    font-weight: 500;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading {
    text-align: center;
    padding: 50px 40px;
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.loading h3 {
    color: #1d1d1f;
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.loading p {
    color: #1d1d1f;
    font-size: 1.1rem;
    font-weight: 400;
}

.spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.6);
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.error {
    background: rgba(254, 215, 215, 0.2);
    backdrop-filter: blur(20px);
    color: rgba(197, 48, 48, 0.95);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid rgba(229, 62, 62, 0.3);
    box-shadow: 
        0 8px 32px rgba(229, 62, 62, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.navigation {
    text-align: center;
    margin-top: 30px;
}

.nav-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: #1d1d1f;
    padding: 16px 32px;
    margin: 0 12px;
    text-decoration: none;
    border-radius: 28px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.01em;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #1d1d1f;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-indicator {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

        .status-online {
            background: linear-gradient(135deg, rgb(70, 180, 80) 0%, #38a169 100%);
            box-shadow: 
                0 0 20px rgba(70, 180, 80, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .status-online::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgb(70, 180, 80) 0%, #38a169 100%);
            opacity: 0.3;
            animation: pulse 2s infinite;
        }

.status-offline {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 0 20px rgba(245, 101, 101, 0.4);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
    100% { transform: scale(1); opacity: 0.3; }
}

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

.refresh-info {
    text-align: center;
    color: #1d1d1f;
    margin-top: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .header h1 {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 24px;
        border-radius: 16px;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 14px 10px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .nav-button {
        display: block;
        margin: 12px auto;
        width: 90%;
        max-width: 320px;
        padding: 14px 28px;
    }
    
    .loading {
        padding: 40px 30px;
    }
    
    .loading h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 24px 16px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
