/* Base styles and layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Header and navigation */
.header {
    color: white;
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.header-left {
    flex: 1;
    text-align: left;
}

.header-right {
    display: flex;
    align-items: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tab-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid transparent;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tab-button:hover {
    background: rgba(255,255,255,0.3);
}

.tab-button.active {
    background: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.6);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats section */
.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255,255,255,0.2);
    padding: 15px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.value-tooltip {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.stat:hover .value-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Common utility styles */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #666;
}

.error {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #f44336;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile responsiveness for base layout */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        margin-bottom: 40px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 25px;
        align-items: center;
    }
    
    .tab-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 200px;
        text-align: center;
    }
    
    .stats {
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .stat {
        padding: 12px 15px;
        flex: 1;
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}