/* ===== RESET Y CONFIGURACIÓN GENERAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --primary-dark: #0a0a0a;
    --primary-blue: #1a1a2e;
    --primary-deep: #16213e;
    --gold-light: #FFD700;
    --gold-medium: #D4AF37;
    --gold-dark: #B8860B;
    --white: #ffffff;
    --white-transparent: rgba(255, 255, 255, 0.9);
    --gray-light: #f0f0f0;
    --gray-medium: #888;
    --gray-dark: #333;
    
    /* Efectos glassmorphism */
    --glass-bg: rgba(255, 215, 0, 0.08);
    --glass-border: rgba(255, 215, 0, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Transiciones */
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 50%, var(--primary-deep) 100%);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== FONDO DE ESTRELLAS ===== */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.8"/></svg>') repeat; animation: twinkle 150s linear infinite; }
.stars2 { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 150 150"><circle cx="75" cy="75" r="0.3" fill="white" opacity="0.6"/></svg>') repeat; animation: twinkle 100s linear infinite; }
.stars3 { background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><circle cx="100" cy="100" r="0.2" fill="white" opacity="0.4"/></svg>') repeat; animation: twinkle 200s linear infinite; }

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

/* ===== PANTALLA DE BIENVENIDA ===== */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity var(--transition-slow);
}

.welcome-screen.active {
    opacity: 1;
}

.welcome-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    z-index: 10;
}

.title-container {
    margin-bottom: 3rem;
}

.main-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gold-text {
    background: linear-gradient(45deg, var(--gold-light), var(--gold-medium));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.magic-text {
    color: var(--white);
    position: relative;
    display: inline-block;
}

.magic-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    animation: magicGlow 2s infinite;
}

@keyframes magicGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.sparkle {
    margin-top: 2rem;
    font-size: 1.5rem;
    color: var(--gold-light);
}

.sparkle i {
    margin: 0 1rem;
    animation: sparkleSpin 3s infinite;
}

@keyframes sparkleSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray-light);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.input-container {
    position: relative;
    max-width: 400px;
    margin: 3rem auto;
}

#nameInput {
    width: 100%;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    color: var(--white);
    outline: none;
    transition: all var(--transition-medium);
}

#nameInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold-light);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.input-decoration {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-light);
    font-size: 1.2rem;
}

.hint {
    margin-top: 1.5rem;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.hint i {
    margin-right: 0.5rem;
    color: var(--gold-light);
}

.welcome-footer {
    margin-top: 4rem;
}

.pulse-circle {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.pulse-circle i {
    color: var(--gold-light);
    font-size: 1.5rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 1;
}

.container.hidden {
    display: none;
}

/* ===== TARJETA DE VIDRIO ===== */
.glass-card {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    transform-style: preserve-3d;
    transition: transform var(--transition-medium);
}

.glass-card:hover {
    transform: translateY(-5px);
}

.card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--gold-light), transparent, var(--gold-medium));
    border-radius: 27px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(15px);
}

/* ===== FOTO ===== */
.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.photo-frame {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 1rem;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(45deg, var(--gold-light), var(--gold-dark)) border-box;
    padding: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-medium);
}

.photo:hover {
    transform: scale(1.05);
}

.photo-shine {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.frame-decoration {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.photo-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.gold-icon {
    color: var(--gold-light);
}

/* ===== MENSAJE ===== */
.message-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.message-title {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.name-highlight {
    background: linear-gradient(45deg, var(--gold-light), var(--white));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.celebration-emoji {
    display: inline-block;
    animation: bounce 1s infinite;
    margin-left: 0.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-underline {
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    margin: 0 auto;
}

.message-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--white-transparent);
}

.message-line {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    border-radius: 10px;
    transition: background var(--transition-fast);
}

.message-line:hover {
    background: rgba(255, 215, 0, 0.05);
}

.quote-icon, .rocket-icon, .code-icon {
    color: var(--gold-light);
    font-size: 1.2rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.blessing {
    text-align: center;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px;
    border-left: 3px solid var(--gold-light);
}

.blessing-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--gold-light);
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.signature {
    text-align: right;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.signature-line {
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light));
    margin: 0 0 1rem auto;
}

.signature-text {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--gray-light);
}

.heart-icon {
    color: #ff4757;
    margin-right: 0.5rem;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.team-name {
    color: var(--gold-light);
    font-weight: 600;
}

/* ===== CONTROLES ===== */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.control-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.control-btn i {
    color: var(--gold-light);
}

.music-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold-light);
}

/* ===== ELEMENTOS FLOTANTES ===== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    color: rgba(255, 215, 0, 0.3);
    font-size: 1.5rem;
    animation: float 20s infinite linear;
}

.floating-element.el1 { top: 10%; left: 5%; animation-delay: 0s; }
.floating-element.el2 { top: 20%; right: 10%; animation-delay: -5s; }
.floating-element.el3 { bottom: 30%; left: 15%; animation-delay: -10s; }
.floating-element.el4 { bottom: 20%; right: 5%; animation-delay: -15s; }

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(90deg); }
    50% { transform: translate(0, -40px) rotate(180deg); }
    75% { transform: translate(-20px, -20px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ===== TARJETA MUSICAL ===== */
.music-card {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.music-card.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.music-card.minimized {
    height: 60px;
    overflow: hidden;
}

.music-card.minimized .video-container,
.music-card.minimized .music-info {
    display: none;
}

.music-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px 15px 0 0;
}

.music-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.music-icon {
    color: var(--gold-light);
    font-size: 1.2rem;
}

.music-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.music-controls {
    display: flex;
    gap: 0.5rem;
}

.music-minimize, .music-close {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: color var(--transition-fast);
}

.music-minimize:hover, .music-close:hover {
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

#ytVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.music-info {
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 15px 15px;
}

.song-title {
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
}

.song-desc {
    font-size: 0.8rem;
    color: var(--gray-medium);
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 2rem;
    margin-top: 3rem;
    z-index: 10;
}

.footer.hidden {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left, .footer-right {
    flex: 1;
    min-width: 300px;
}

.legal {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.credits {
    text-align: right;
    color: var(--white-transparent);
    font-size: 0.95rem;
}

.magic-icon {
    color: var(--gold-light);
    margin: 0 0.3rem;
}

.creator {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.creator:hover {
    color: var(--white);
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-link {
    color: var(--gray-medium);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--gold-light);
}

.separator {
    color: var(--gray-medium);
}

.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave {
    background: rgba(255, 215, 0, 0.1);
    height: 2px;
    animation: waveMove 3s infinite linear;
}

@keyframes waveMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== RESPONSIVIDAD ===== */
@media (max-width: 1024px) {
    .main-title {
        font-size: 3.2rem;
    }
    
    .glass-card {
        padding: 2.5rem;
    }
    
    .message-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .glass-card {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .message-title {
        font-size: 2rem;
    }
    
    .message-content {
        font-size: 1rem;
    }
    
    .photo-frame {
        width: 150px;
        height: 150px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .music-card {
        width: 300px;
        right: 20px;
        bottom: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        min-width: 100%;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .glass-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .message-title {
        font-size: 1.7rem;
    }
    
    .photo-frame {
        width: 120px;
        height: 120px;
    }
    
    .input-container {
        max-width: 300px;
    }
    
    #nameInput {
        padding: 1rem 2.5rem 1rem 1.2rem;
        font-size: 1rem;
    }
    
    .music-card {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}
/* ===== VIDEO FALLBACK STYLES ===== */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 2;
}

.fallback-content {
    text-align: center;
    padding: 2rem;
    max-width: 90%;
}

.fallback-icon {
    font-size: 4rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.fallback-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.fallback-content p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.play-init-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--gold-medium), var(--gold-light));
    border: none;
    border-radius: 50px;
    color: var(--primary-dark);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0 auto 1rem;
    min-width: 250px;
}

.play-init-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.play-init-btn:active {
    transform: translateY(-1px);
}

.fallback-hint {
    font-size: 0.8rem;
    color: var(--gray-medium);
    font-style: italic;
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    z-index: 1;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
}

.volume-control i {
    color: var(--gold-light);
    font-size: 0.9rem;
}

#volumeSlider {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-light);
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-light);
    cursor: pointer;
    border: none;
}

/* Estados de la música */
.music-loading {
    position: relative;
}

.music-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--gold-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}