/* ===== 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;
    --primary-purple: #2d1b69;
    --gold-light: #FFD700;
    --gold-medium: #D4AF37;
    --gold-dark: #B8860B;
    --gold-glow: #fff9c4;
    --white: #ffffff;
    --white-transparent: rgba(255, 255, 255, 0.9);
    --gray-light: #f0f0f0;
    --gray-medium: #888;
    --gray-dark: #333;
    
    /* Efectos glassmorphism mejorados */
    --glass-bg: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(255, 215, 0, 0.05) 50%,
        rgba(255, 215, 0, 0.12) 100%);
    --glass-border: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.3), 
        rgba(255, 255, 255, 0.1),
        rgba(255, 215, 0, 0.3));
    --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                    0 0 0 1px rgba(255, 215, 0, 0.1);
    
    /* Transiciones mejoradas */
    --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) 25%, 
        var(--primary-purple) 50%,
        var(--primary-deep) 100%);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-attachment: fixed;
}

/* ===== FONDO DE CONSTELACIÓN ESTELAR MEJORADO ===== */
#constellation-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(86, 61, 124, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(26, 26, 46, 0.05) 0%, transparent 40%);
}

/* Capas de estrellas mejoradas */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Estrellas grandes con brillo */
.stars { 
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><path d="M60 15 L65 50 L95 50 L70 70 L80 105 L60 85 L40 105 L50 70 L25 50 L55 50 Z" fill="%23FFD700" opacity="0.9"/></svg>') repeat;
    animation: twinkle 15s ease-in-out infinite, moveStars 200s linear infinite;
}

/* Estrellas medianas */
.stars2 { 
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><circle cx="40" cy="40" r="1.5" fill="white" opacity="0.7"><animate attributeName="opacity" values="0.3;0.9;0.3" dur="8s" repeatCount="indefinite"/></circle></svg>') repeat;
    animation: twinkle 8s ease-in-out infinite alternate, moveStars 150s linear infinite reverse;
}

/* Estrellas pequeñas */
.stars3 { 
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><circle cx="30" cy="30" r="0.8" fill="%23FFF9C4" opacity="0.6"><animate attributeName="r" values="0.8;1.2;0.8" dur="5s" repeatCount="indefinite"/></circle></svg>') repeat;
    animation: twinkle 5s ease-in-out infinite, moveStars 100s linear infinite;
}

/* Estrellas en órbita */
.constellation-orbit {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.constellation-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold-light);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px var(--gold-glow));
}

/* Animaciones mejoradas */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        filter: brightness(0.8) drop-shadow(0 0 3px transparent);
    }
    50% { 
        opacity: 1;
        filter: brightness(1.5) drop-shadow(0 0 8px var(--gold-glow));
    }
}

@keyframes moveStars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes orbitStar {
    0% {
        transform: rotate(0deg) translateX(300px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: rotate(180deg) translateX(300px) rotate(-180deg);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(300px) rotate(-360deg);
        opacity: 0.7;
    }
}

/* Lluvia de estrellas */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--gold-light), transparent);
    filter: drop-shadow(0 0 10px var(--gold-light));
    transform: rotate(-45deg);
    opacity: 0;
}

/* ===== 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);
    background: radial-gradient(circle at center, 
        rgba(10, 10, 10, 0.8) 0%,
        rgba(26, 26, 46, 0.7) 50%,
        rgba(22, 33, 62, 0.6) 100%);
}

.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;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.gold-text {
    background: linear-gradient(45deg, var(--gold-light), var(--gold-medium), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    background-size: 200% auto;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.magic-text {
    color: var(--white);
    position: relative;
    display: inline-block;
    animation: floatText 6s ease-in-out infinite;
}

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

.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;
        filter: drop-shadow(0 0 5px transparent);
    }
    50% { 
        opacity: 1;
        filter: drop-shadow(0 0 15px var(--gold-light));
    }
}

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

.sparkle i {
    margin: 0 1rem;
    animation: sparkleSpin 3s infinite;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

@keyframes sparkleSpin {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 5px var(--gold-light));
    }
    50% { 
        transform: rotate(180deg) scale(1.3);
        filter: drop-shadow(0 0 15px var(--gold-glow));
    }
}

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

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.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.08);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 50px;
    color: var(--white);
    outline: none;
    transition: all var(--transition-medium);
    backdrop-filter: blur(10px);
}

#nameInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold-light);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4),
                inset 0 0 20px rgba(255, 215, 0, 0.1);
}

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

@keyframes bounceRight {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
}

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

.hint i {
    margin-right: 0.5rem;
    color: var(--gold-light);
    animation: pulse 2s infinite;
}

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

.pulse-circle {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.pulse-circle i {
    color: var(--gold-light);
    font-size: 1.5rem;
    animation: arrowFloat 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

/* ===== 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 MEJORADA ===== */
.glass-card {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid transparent;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    transform-style: preserve-3d;
    transition: transform var(--transition-medium);
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--gold-light), 
        transparent);
}

.glass-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 215, 0, 0.2);
}

.card-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: conic-gradient(
        from 0deg,
        var(--gold-light),
        transparent,
        var(--gold-medium),
        transparent,
        var(--gold-light)
    );
    border-radius: 35px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(30px);
    animation: rotateGlow 20s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.photo-frame {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid transparent;
    background: linear-gradient(45deg, var(--gold-light), var(--gold-dark), var(--gold-light)) border-box;
    padding: 6px;
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
    position: relative;
    z-index: 2;
}

.photo:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 
        0 0 70px rgba(255, 215, 0, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.2);
}

.photo-shine {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: radial-gradient(
        circle at 30% 30%, 
        rgba(255, 255, 255, 0.4) 0%, 
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: shineRotate 10s linear infinite;
}

@keyframes shineRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.frame-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 3px dashed rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.photo-caption {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.gold-icon {
    color: var(--gold-light);
    animation: iconPulse 2s infinite;
}

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

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

.message-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.name-highlight {
    background: linear-gradient(45deg, 
        var(--gold-light), 
        var(--white), 
        var(--gold-medium));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    background-size: 200% auto;
    animation: nameShimmer 3s infinite linear;
    padding: 0 0.5rem;
}

@keyframes nameShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.celebration-emoji {
    display: inline-block;
    animation: bounce 1s infinite, rotate 5s infinite linear;
    margin-left: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.title-underline {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--gold-light), 
        var(--gold-medium),
        var(--gold-light),
        transparent);
    margin: 0 auto;
    border-radius: 2px;
    animation: underlineFlow 3s infinite linear;
    background-size: 200% 100%;
}

@keyframes underlineFlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.message-line {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
    padding: 1rem;
    border-radius: 15px;
    transition: all var(--transition-medium);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.message-line:hover {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.quote-icon, .rocket-icon, .code-icon {
    color: var(--gold-light);
    font-size: 1.3rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.quote-icon {
    animation: quoteFloat 4s ease-in-out infinite;
}

.rocket-icon {
    animation: rocketFloat 3s ease-in-out infinite;
}

.code-icon {
    animation: codePulse 2s ease-in-out infinite;
}

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

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(5deg); }
    75% { transform: translateY(5px) rotate(-5deg); }
}

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

.blessing {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.1) 0%,
        rgba(255, 215, 0, 0.05) 50%,
        rgba(255, 215, 0, 0.1) 100%
    );
    border-radius: 20px;
    border-left: 4px solid var(--gold-light);
    border-right: 4px solid var(--gold-medium);
    position: relative;
    overflow: hidden;
}

.blessing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: blessingShine 3s infinite linear;
}

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

.blessing-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold-light);
    animation: glow 2s infinite, floatText 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.signature {
    text-align: right;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

.signature::before {
    content: '';
    position: absolute;
    top: -2px;
    right: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light));
    animation: signatureLine 3s infinite;
}

@keyframes signatureLine {
    0%, 100% { width: 100px; }
    50% { width: 300px; }
}

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

.signature-text {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
}

.heart-icon {
    color: #ff4757;
    margin-right: 0.5rem;
    animation: heartbeat 1.2s infinite;
    filter: drop-shadow(0 0 10px #ff4757);
}

.team-name {
    color: var(--gold-light);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

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

.control-btn {
    padding: 1rem 2rem;
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 215, 0, 0.08) 100%
    );
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 50px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 215, 0, 0.15) 100%
    );
    border-color: var(--gold-light);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.02);
}

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

.music-btn.active {
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 215, 0, 0.2) 100%
    );
    border-color: var(--gold-light);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.music-btn.active i {
    animation: musicBeat 1s infinite;
}

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

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

.floating-element {
    position: absolute;
    color: var(--gold-light);
    font-size: 2rem;
    animation: floatOrbit 30s infinite linear;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    opacity: 0.7;
    z-index: 0;
}

.floating-element.el1 { 
    top: 15%; 
    left: 10%; 
    animation: floatOrbit 25s infinite linear;
    animation-delay: 0s;
    font-size: 2.5rem;
}

.floating-element.el2 { 
    top: 25%; 
    right: 15%; 
    animation: floatOrbit 30s infinite linear reverse;
    animation-delay: -5s;
}

.floating-element.el3 { 
    bottom: 35%; 
    left: 20%; 
    animation: floatOrbit 35s infinite linear;
    animation-delay: -10s;
    font-size: 1.8rem;
}

.floating-element.el4 { 
    bottom: 25%; 
    right: 10%; 
    animation: floatOrbit 28s infinite linear reverse;
    animation-delay: -15s;
    font-size: 2.2rem;
}

/* Nuevos elementos flotantes */
.floating-element.el5 { 
    top: 40%; 
    left: 5%; 
    animation: floatOrbit 32s infinite linear;
    animation-delay: -7s;
}

.floating-element.el6 { 
    top: 60%; 
    right: 8%; 
    animation: floatOrbit 26s infinite linear reverse;
    animation-delay: -12s;
}

@keyframes floatOrbit {
    0% { 
        transform: rotate(0deg) translateX(250px) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% { 
        transform: rotate(90deg) translateX(250px) rotate(-90deg) scale(1.1);
        opacity: 0.8;
    }
    50% { 
        transform: rotate(180deg) translateX(250px) rotate(-180deg) scale(1.2);
        opacity: 1;
    }
    75% { 
        transform: rotate(270deg) translateX(250px) rotate(-270deg) scale(1.1);
        opacity: 0.8;
    }
    100% { 
        transform: rotate(360deg) translateX(250px) rotate(-360deg) scale(1);
        opacity: 0.6;
    }
}

/* ===== TARJETA MUSICAL MEJORADA ===== */
.music-card {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.95) 0%,
        rgba(26, 26, 46, 0.9) 50%,
        rgba(22, 33, 62, 0.95) 100%
    );
    border: 1px solid transparent;
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 215, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
    z-index: 1000;
    transition: all var(--transition-medium);
    overflow: hidden;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--gold-light), 
        var(--gold-medium),
        var(--gold-light),
        transparent);
    animation: borderFlow 3s infinite linear;
}

@keyframes borderFlow {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

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

.music-card.minimized {
    height: 70px;
    overflow: hidden;
    width: 300px;
}

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

.music-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(
        90deg,
        rgba(255, 215, 0, 0.1) 0%,
        rgba(255, 215, 0, 0.05) 50%,
        rgba(255, 215, 0, 0.1) 100%
    );
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

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

.music-icon {
    color: var(--gold-light);
    font-size: 1.3rem;
    animation: musicNote 2s infinite ease-in-out;
}

@keyframes musicNote {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(10deg); }
}

.music-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

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

.music-minimize, .music-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.music-minimize:hover, .music-close:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold-light);
    color: var(--gold-light);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

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

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

.music-info {
    padding: 1.2rem 1.5rem;
    text-align: center;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.4)
    );
    border-radius: 0 0 20px 20px;
    position: relative;
}

.music-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 215, 0, 0.5), 
        transparent);
}

.song-title {
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

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

/* ===== VOLUME CONTROL MEJORADO ===== */
.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(10px);
}

.volume-control i {
    color: var(--gold-light);
    font-size: 1rem;
    min-width: 20px;
}

#volumeSlider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(
        90deg,
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 215, 0, 0.8) 50%,
        rgba(255, 215, 0, 0.3) 100%
    );
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-light);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    transition: all var(--transition-fast);
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 1);
}

#volumeSlider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-light);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    transition: all var(--transition-fast);
}

#volumeSlider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 1);
}

/* ===== VIDEO FALLBACK MEJORADO ===== */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 2;
    padding: 2rem;
}

.fallback-content {
    text-align: center;
    padding: 2rem;
    max-width: 90%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.fallback-icon {
    font-size: 4.5rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite, rotate 10s infinite linear;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.fallback-content h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.fallback-content p {
    color: var(--gray-light);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.play-init-btn {
    padding: 1.2rem 2.5rem;
    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: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto 1.5rem;
    min-width: 280px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.play-init-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
}

.play-init-btn:hover::before {
    left: 100%;
}

.play-init-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.5);
}

.play-init-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.fallback-hint {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-style: italic;
    margin-top: 1rem;
}

/* Estados de la música */
.music-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.music-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: var(--gold-light);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

/* ===== FOOTER MEJORADO ===== */
.footer {
    position: relative;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        transparent 100%
    );
    padding: 2.5rem;
    margin-top: 4rem;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.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: 1.5rem;
}

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

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

.credits {
    text-align: right;
    color: var(--white-transparent);
    font-size: 1rem;
    line-height: 1.6;
}

.magic-icon, .heart-icon {
    margin: 0 0.5rem;
}

.creator {
    color: var(--gold-light);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.creator:hover {
    color: var(--white);
    background: rgba(255, 215, 0, 0.1);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

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

.footer-link {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link:hover {
    color: var(--gold-light);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.separator {
    color: var(--gray-medium);
    font-size: 1.2rem;
}

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

.wave {
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-light),
        var(--gold-medium),
        var(--gold-light),
        transparent
    );
    animation: waveMove 4s infinite linear;
    background-size: 200% 100%;
}

@keyframes waveMove {
    0% { 
        background-position: 200% 0;
        opacity: 0.5;
    }
    50% { 
        background-position: 0 0;
        opacity: 1;
    }
    100% { 
        background-position: -200% 0;
        opacity: 0.5;
    }
}

/* ===== RESPONSIVIDAD MEJORADA ===== */
@media (max-width: 1024px) {
    .main-title {
        font-size: 3.5rem;
    }
    
    .glass-card {
        padding: 2.8rem;
        margin: 1rem;
    }
    
    .message-title {
        font-size: 2.6rem;
    }
    
    .floating-element {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.8rem;
    }
    
    .glass-card {
        padding: 2rem;
        border-radius: 20px;
        margin: 0.5rem;
    }
    
    .message-title {
        font-size: 2.2rem;
    }
    
    .message-content {
        font-size: 1.05rem;
    }
    
    .photo-frame {
        width: 180px;
        height: 180px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .control-btn {
        width: 100%;
        justify-content: center;
    }
    
    .music-card {
        width: 320px;
        right: 20px;
        bottom: 20px;
    }
    
    .floating-element {
        display: none;
    }
    
    .floating-element.el1, 
    .floating-element.el2 {
        display: block;
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        min-width: 100%;
        text-align: center;
    }
    
    .credits {
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.3rem;
    }
    
    .glass-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .message-title {
        font-size: 1.8rem;
    }
    
    .photo-frame {
        width: 150px;
        height: 150px;
    }
    
    .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;
        bottom: 15px;
    }
    
    .floating-elements {
        display: none;
    }
    
    .footer {
        padding: 1.5rem;
    }
}

/* Efectos de partículas doradas */
.gold-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    border-radius: 50%;
    filter: blur(1px);
    animation: particleFloat 20s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Efecto de neblina cósmica */
.cosmic-fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 27, 105, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(26, 26, 46, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
    animation: fogMove 30s infinite linear;
}

@keyframes fogMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}