/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --gold: #FFD700;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    --winner-glow: 0 0 30px rgba(255, 215, 0, 0.5);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Snow Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: white;
    opacity: 0.8;
    animation: fall linear infinite;
    user-select: none;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
}

.header-decorations {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.decoration {
    animation: bounce 2s ease-in-out infinite;
}

.decoration:nth-child(2) { animation-delay: 0.2s; }
.decoration:nth-child(3) { animation-delay: 0.4s; }
.decoration:nth-child(4) { animation-delay: 0.6s; }
.decoration:nth-child(5) { animation-delay: 0.8s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.main-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.sub-header {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Winner Section */
.winner-section {
    margin-bottom: 2.5rem;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.winner-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--winner-glow);
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.winner-label {
    font-size: 1rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.winner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.winner-trophy {
    font-size: 4rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.winner-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
}

.winner-score {
    font-size: 1.2rem;
    color: var(--gold);
    margin-top: 0.5rem;
}

.no-winner {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px dashed var(--card-border);
}

/* Leaderboard Container */
.leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Day Row */
.day-row {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.day-row:nth-child(1) { animation-delay: 0.1s; }
.day-row:nth-child(2) { animation-delay: 0.2s; }
.day-row:nth-child(3) { animation-delay: 0.3s; }
.day-row:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-label {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-label-icon {
    font-size: 1.5rem;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Team Block */
.team-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.team-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--team-color, #666);
    border-radius: 16px 16px 0 0;
}

.team-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--team-color, var(--card-border));
}

.team-block.day-winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, var(--card-bg) 100%);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.team-block.day-winner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

/* Crown and Trophy for Winner */
.winner-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.3rem;
    font-size: 1.3rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.team-color-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: var(--team-color, #666);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.team-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.team-score {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.team-block.day-winner .team-score {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.3rem;
}

/* Zero Score Styling */
.team-block.zero-score {
    opacity: 0.6;
}

.team-block.zero-score .team-score {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header-decorations {
        font-size: 1.5rem;
        gap: 1rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .team-block {
        padding: 1.2rem 1rem;
    }

    .team-name {
        font-size: 0.9rem;
    }

    .team-score {
        font-size: 2rem;
    }

    .winner-trophy {
        font-size: 3rem;
    }

    .winner-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .team-block {
        padding: 1rem 0.8rem;
    }

    .team-color-indicator {
        width: 30px;
        height: 30px;
    }

    .team-name {
        font-size: 0.8rem;
    }

    .team-score {
        font-size: 1.8rem;
    }

    .winner-badges {
        font-size: 1rem;
    }

    .day-label {
        font-size: 1.1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

