:root {
    /* Main Theme Variables inheritance */
    --font-main: 'Poppins', sans-serif;
    --black: #000000;
    --white: #ffffff;
    --gold: #f2df90;
    --pink: #e53363;
    --blue: #1f3ca2;
    --green: #2cb798;
}

body {
    background-color: var(--black);
    color: #aaaaaa;
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
}

.no-scroll {
    overflow: hidden;
}

.ticket-section {
    padding: 85px 0 40px;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(31, 60, 162, 0.05), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(44, 183, 152, 0.05), transparent 40%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--gold), var(--pink), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0px;
}

.subtitle {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Counter */
.counter-box {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0px auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.count-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
}

.count-label {
    font-size: 0.8rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    font-weight: 500;
}

.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 5px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    /* Neutral border instead of blue */
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    /* Neutral glow */
}

/* Fix for Chrome Autofill White Background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #000 inset;
    /* Match body bg */
    transition: background-color 5000s ease-in-out 0s;
}

/* Change inset shadow on focus to match input active state */
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset;
    /* Slightly lighter on focus */
}

.btn-submit {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(31, 60, 162, 0.3);
}

.note {
    font-size: 0.85rem;
    color: #888;
    margin-top: 20px;
}

/* Success/Error Message */
#message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
    font-size: 0.9rem;
}

.success {
    background: rgba(44, 183, 152, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

.error {
    background: rgba(229, 51, 99, 0.1);
    border: 1px solid var(--pink);
    color: var(--pink);
}

/* Responsive */
@media (max-width: 768px) {
    .content-box {
        padding: 15px 20px;
    }

    h1 {
        font-size: 2rem;
        margin-top: 10px;
        /* Space for counter */
    }
}

/* --- TICKET MODAL ANIMATION --- */
.ticket-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* Darker */
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.ticket-modal.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.ticket-modal-content {
    background: transparent;
    padding: 40px 20px 20px;
    width: 90%;
    max-width: 300px;
    text-align: center;
    position: relative;
    perspective: 1500px;
}

.ticket-wrapper {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
    /* Idle floating */
}

/* ... existing code ... */

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 40px;
    /* Increased size */
    height: 40px;
    /* Increased size */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    opacity: 0.8;
    padding: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    opacity: 1;
}

.close-modal:hover svg {
    transform: rotate(90deg) scale(1.1);
}

.ticket-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
    /* Idle floating */
}

/* Holographic Shine Effect */
.ticket-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.2) 47%, rgba(255, 255, 255, 0) 50%);
    border-radius: 15px;
    pointer-events: none;
    z-index: 10;
    background-size: 300% 300%;
    animation: shine 3s ease-in-out infinite;
}

#generated-ticket-img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(44, 183, 152, 0.4), 0 0 20px rgba(44, 183, 152, 0.2);
    /* Green Glow */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Entry Animation */
    animation: epicEntrance 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

/* Epic Entrance: Rotate, Scale, and Flip */
@keyframes epicEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateX(100deg) rotateY(-30deg) translateY(100px);
    }

    60% {
        opacity: 1;
        transform: scale(1.05) rotateX(-10deg) rotateY(10deg) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateX(0) rotateY(0) translateY(0);
    }
}

/* Idle Floating */
@keyframes float {
    0% {
        transform: translateY(0px) rotateZ(0deg);
    }

    50% {
        transform: translateY(-10px) rotateZ(2deg);
    }

    100% {
        transform: translateY(0px) rotateZ(0deg);
    }
}

/* Shine Sweep */
@keyframes shine {
    0% {
        background-position: 100% 100%;
    }

    20% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 0%;
    }

    /* Wait */
}

/* --- PROMO MUSIC WIDGET (FLOATING FIXO) --- */
.promo-music-widget {
    position: fixed;
    bottom: 15px; /* Punto intermedio perfecto */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.85); /* Dark solid glass to ensure legibility */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 6px 8px; /* Padding simétrico para que la fecha y la portada estén a la misma distancia de los bordes = 8px */
    width: max-content;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    animation: floatUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1s;
    pointer-events: auto; /* Allow interaction if needed */
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.promo-cover {
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Make it rounded like a music player thumb */
    object-fit: cover;
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.promo-info {
    text-align: left;
}

.promo-info h4 {
    margin: 0;
    font-size: 0.8rem;
    color: var(--white);
    font-weight: 700; /* Incrementado a bold/semibold más notorio */
    line-height: 1.2;
}

.promo-info span {
    font-size: 0.65rem;
    color: #cccccc;
    display: block;
}

.promo-date {
    font-size: 0.70rem;
    color: var(--green);
    font-weight: 600;
    margin-left: 12px; /* Alineado para que coincida con el margin de la portada */
    background: rgba(44, 183, 152, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Remove strict overflow to let flexbox work */