/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #9b59b6;
    --accent-color: #00d4ff;
    --dark-bg: #0a0e27;
    --darker-bg: #050811;
    --card-bg: rgba(15, 20, 40, 0.85);
    --text-light: #e0e0e0;
    --text-white: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glow-blue: rgba(74, 144, 226, 0.3);
    --glow-purple: rgba(155, 89, 182, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    background: var(--darker-bg);
    overflow-x: hidden;
    position: relative;
}

/* Clases para animaciones de aparición */
.card-hidden {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
}

.card-visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.participant-card.card-visible {
    transition-delay: calc(var(--card-index, 0) * 0.1s);
}

.section.card-visible {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Fondo fijo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/fondo.jpg') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
    z-index: -2;
}

/* Overlay oscuro sobre el fondo */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 14, 39, 0.92) 0%,
        rgba(5, 8, 17, 0.88) 50%,
        rgba(10, 14, 39, 0.92) 100%
    );
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 8, 17, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    text-shadow: 0 0 10px var(--glow-blue);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

/* CTA dentro de la navegación: hereda estilos del CTA principal y se ajusta */
.nav-item-cta {
    display: flex;
    align-items: center;
}


.nav-item-cta {
    display: flex;
    align-items: center;
    margin-left: 0.6rem;
}

.nav-cta {
    display: inline-block;
    padding: 0.6rem 1.8rem; /* más padding lateral */
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-white);
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 22px;
    text-decoration: none;
    box-shadow: 0 6px 18px var(--glow-blue);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 50px;
    text-align: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px var(--glow-blue));
    animation: float 6s ease-in-out infinite;
}

/* Estilos para el botón de votación (CTA) */
.cta-button {
    display: block;
    margin: 0 auto 1.5rem;
    padding: 0.9rem 1.6rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-white);
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 30px var(--glow-purple), 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid rgba(255,255,255,0.06);
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
    animation: pulse-cta 3.5s ease-in-out infinite;
    max-width: 320px;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 40px rgba(123,36,255,0.28);
}

.cta-button:active {
    transform: translateY(-1px) scale(0.995);
}

.cta-button:focus {
    outline: 3px solid rgba(255,255,255,0.08);
    outline-offset: 3px;
}

@keyframes pulse-cta {
    0% { box-shadow: 0 8px 30px rgba(123,36,255,0.12); }
    50% { box-shadow: 0 14px 40px rgba(123,36,255,0.20); }
    100% { box-shadow: 0 8px 30px rgba(123,36,255,0.12); }
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px var(--glow-purple);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-text p {
    margin-bottom: 1rem;
    background: rgba(15, 20, 40, 0.6);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    backdrop-filter: blur(5px);
}

/* Secciones */
.section {
    padding: 80px 20px;
    position: relative;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-white);
    text-shadow: 0 0 15px var(--glow-blue);
}

.title-decoration {
    display: inline-block;
    margin: 0 1rem;
    opacity: 0.8;
    font-size: 2rem;
}

.content-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
}

.content-box p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.content-box strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Sección Idol */
.section-idol {
    background: linear-gradient(
        180deg,
        rgba(74, 144, 226, 0.05) 0%,
        transparent 100%
    );
}

/* Sección Normas */
.rules-list {
    list-style: none;
    counter-reset: rule-counter;
}

.rules-list li {
    counter-increment: rule-counter;
    margin-bottom: 2rem;
    padding-left: 3rem;
    position: relative;
}

.rules-list li::before {
    content: counter(rule-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-white);
    box-shadow: 0 0 15px var(--glow-blue);
}

.rules-list h3 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-family: 'Cinzel', serif;
}

.rules-list p {
    margin: 0;
    font-size: 1rem;
}

/* Sección Participantes */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.participant-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px var(--shadow-color);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.participant-card:hover {
    box-shadow: 0 12px 48px rgba(0, 212, 255, 0.3);
    border-color: var(--accent-color);
}

.participant-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(155, 89, 182, 0.2));
}

.participant-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin-bottom: 1rem;
    box-shadow: 0 0 20px var(--glow-blue);
    object-fit: cover;
}

.participant-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--text-white);
    margin: 0;
}

.participant-body {
    padding: 1.5rem;
}

.participant-bio {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.song-link {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-blue);
}

.song-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px var(--glow-purple);
}

.song-link span {
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link.twitch {
    background: #9146ff;
    color: white;
}

.social-link.kick {
    background: #000;
    color: #000;
}

.social-link.twitter {
    background: #1da1f2;
    color: white;
}

.social-link:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 4px 15px currentColor;
}

/* Footer */
.footer {
    background: rgba(5, 8, 17, 0.95);
    padding: 3rem 0 2rem;
    text-align: center;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.footer-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 2rem;
    text-shadow: 0 0 15px var(--glow-blue);
}

.organizers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.organizer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.organizer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    font-family: 'Cinzel', serif;
}

.organizer-links {
    display: flex;
    gap: 0.8rem;
}

.footer-social {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-social.twitch {
    background: #9146ff;
    color: white;
}

.footer-social.twitter {
    background: #1da1f2;
    color: white;
}

.footer-social:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 20px currentColor;
}

.footer-copyright {
    margin: 2rem 0 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(5, 8, 17, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1rem;
        border-top: 1px solid rgba(74, 144, 226, 0.3);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    .hero-text {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .title-decoration {
        font-size: 1.5rem;
        margin: 0 0.5rem;
    }

    .content-box {
        padding: 1.5rem;
    }

    .rules-list li {
        padding-left: 2.5rem;
    }

    .rules-list li::before {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .participants-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Fallback: asegurar que las participant-card sean visibles en móviles
       si IntersectionObserver/JS no revela las tarjetas correctamente */
    .participants-grid .participant-card {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }

    /* En móvil, el CTA del menú ocupa la mayor parte del ancho y queda centrado */
    .nav-cta {
        width: 80%;
        margin: 0.4rem auto;
        padding: 0.8rem 1rem;
        text-align: center;
        border-radius: 12px;
        font-size: 1rem;
    }

    /* Asegurar que el CTA del header no empuje la disposición en móviles */
    .nav-cta-container {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}

/* Contenedor del CTA en la navegación (a la derecha) */
.nav-cta-container {
    display: flex;
    align-items: center;
    margin-left: 0.8rem;
}

/* Alinear verticalmente el CTA con el texto del menú */
.nav-cta-container {
    align-self: baseline;
}

.nav-cta {
    margin-top: 20px;
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-text p {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .content-box {
        padding: 1rem;
    }

    .rules-list h3 {
        font-size: 1.1rem;
    }

    .participant-name {
        font-size: 1.1rem;
    }

    .participant-avatar {
        width: 100px;
        height: 100px;
    }

    .footer-title {
        font-size: 1.5rem;
    }

    .organizers {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .organizers {
        gap: 1.5rem;
    }

    .organizer-name {
        font-size: 1rem;
    }

    .footer-social {
        width: 32px;
        height: 32px;
    }

    .footer-social svg {
        width: 16px;
        height: 16px;
    }
}
