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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

#graph-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.header p {
    font-size: 1.3em;
    opacity: 0.9;
    color: #e0e0e0;
}

.last-updated {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 0.95em;
    animation: fadeIn 1s ease-out 0.3s both;
}

.leaderboard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    padding: 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: all 0.3s ease;
    animation: fadeInRow 0.5s ease-out both;
}

tbody tr:nth-child(even) {
    background: rgba(102, 126, 234, 0.02);
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

tbody tr:last-child {
    border-bottom: none;
}

td {
    padding: 18px 20px;
}

.rank {
    font-weight: bold;
    font-size: 1.2em;
    width: 80px;
}

.rank-1 { 
    color: #f39c12;
}
.rank-2 { color: #95a5a6; }
.rank-3 { color: #e67e22; }

.medal {
    font-size: 1.5em;
    margin-right: 8px;
    display: inline-block;
}

.team-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.score {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.primary-score {
    color: #27ae60;
    font-size: 1.2em;
    font-weight: 700;
}

.empty {
    text-align: center;
    padding: 80px;
    color: #95a5a6;
    font-size: 1.2em;
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 1s ease-out 0.5s both;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

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

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

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
    }
}
