:root {
    --bg-dark: #0f172a;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.6);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Globs */
.background-glob {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    z-index: -1;
    filter: blur(80px);
    animation: float 10s infinite ease-in-out;
}

.background-glob.two {
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    top: auto;
    bottom: -100px;
    left: auto;
    right: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
}

.glow-text {
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    margin-bottom: 1rem;
}

.prize-text {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 2rem;
}

/* Glassmorphism Utilities */
.blur-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.timer-card {
    display: inline-flex;
    flex-direction: column;
    padding: 2rem 4rem;
    margin: 0 auto;
}

.timer-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 1.5rem 3rem;
    margin-bottom: 3rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Winner Section */
.winner-container {
    width: 100%;
    margin-bottom: 3rem;
    animation: popIn 0.5s ease-out;
}

.hidden {
    display: none;
}

.winner-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
}

.winner-card h3 {
    color: #ffd700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.winner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Search Container */
.search-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 3rem auto;
}

#search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Participants Grid */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.participant-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.participant-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.participant-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 1rem;
    object-fit: cover;
    box-shadow: 0 0 15px var(--primary-glow);
}

.participant-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    word-break: break-all;
}

.participant-points {
    font-size: 0.9rem;
    color: var(--secondary);
    background: rgba(236, 72, 153, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .glow-text {
        font-size: 2.2rem;
    }

    .prize-text {
        font-size: 1.5rem;
    }

    .timer-card {
        padding: 1.5rem 2rem;
        width: 100%;
    }

    .timer-display {
        font-size: 2.8rem;
    }

    .stats-bar {
        width: 100%;
        gap: 2rem;
        padding: 1.5rem 1rem;
        flex-direction: row;
        justify-content: space-around;
        margin-bottom: 2rem;
    }

    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .participant-card {
        padding: 1rem;
    }

    .participant-avatar {
        width: 60px;
        height: 60px;
    }

    .participant-name {
        font-size: 0.95rem;
    }
}