:root {
    --primary-bg: #0d0221;
    --accent-color: #00d4ff;
    --secondary-accent: #ff00c8;
    --gold: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --font-main: 'Montserrat', sans-serif;
}

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

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Replaced with the generated image path */
    background-image: url('https://image.pollinations.ai/prompt/A%20futuristic,%20high-tech%20musical%20contest%20stage%20for%20an%20AI-themed%20singing%20competition%20called%20Pauvisi%C3%B3n.%20Deep%20purple%20and%20neon%20blue%20lighting,%20holographic%20elements,%20cinematic%20wide%20shot,%20glass%20surfaces,%20sophisticated%20and%20premium%20aesthetic.%208k%20resolution,%20photorealistic.?width=1024&height=1024&nologo=true');
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
    z-index: -1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.hero {
    text-align: center;
    margin-top: 2rem;
}

h1 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.3rem;
    opacity: 0.8;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    transition: transform 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-accent));
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-weight: bold;
    border-radius: 50px;
    margin-top: 1.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 200, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
}

.scoreboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    animation: slideIn 0.5s forwards;
    opacity: 0;
}

.score-item .performer {
    font-weight: 700;
}

.score-item .song {
    font-weight: 400;
    opacity: 0.7;
    margin-left: 10px;
    font-style: italic;
}

.score-item .points {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.winner-card {
    margin-top: 3rem;
    border: 2px solid var(--gold);
    animation: pulse 2s infinite;
}

#winner-name {
    font-size: 3.5rem;
    margin: 1rem 0;
    background: linear-gradient(45deg, var(--gold), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary-accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    20% {
        clip: rect(62px, 9999px, 42px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 78px, 0);
    }

    60% {
        clip: rect(54px, 9999px, 23px, 0);
    }

    80% {
        clip: rect(87px, 9999px, 65px, 0);
    }

    100% {
        clip: rect(43px, 9999px, 89px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(15px, 9999px, 34px, 0);
    }

    20% {
        clip: rect(82px, 9999px, 42px, 0);
    }

    40% {
        clip: rect(50px, 9999px, 18px, 0);
    }

    60% {
        clip: rect(34px, 9999px, 73px, 0);
    }

    80% {
        clip: rect(17px, 9999px, 95px, 0);
    }

    100% {
        clip: rect(63px, 9999px, 29px, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
        letter-spacing: 0.2rem;
    }

    .container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .score-item {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .score-item .points {
        align-self: flex-end;
        font-size: 1.2rem;
    }

    #winner-name {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 0.1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    .score-item .song {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        font-size: 0.9rem;
    }
}