/* Styles for Universo de Flores Amarillas 2026 */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Montserrat:wght@400;600;800&family=Great+Vibes&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #1a0f02 0%, #0d0618 45%, #030207 100%);
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

/* WebGL Canvas Container */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Welcome Overlay Screen */
#welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: radial-gradient(circle at center, #1b1202 0%, #08040d 65%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
    padding: 24px;
}

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

.sunflower-glow-container {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sunflower-glow-container::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(255, 140, 0, 0.25) 45%, rgba(0,0,0,0) 75%);
    animation: pulseGlow 3s infinite ease-in-out;
    z-index: 1;
}

.sunflower-svg {
    width: 140px;
    height: 140px;
    z-index: 2;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
    animation: floatRotate 6s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; }
}

@keyframes floatRotate {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}

.welcome-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    letter-spacing: 3px;
    color: #ffda79;
    text-transform: uppercase;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(255, 218, 121, 0.6);
}

.welcome-title {
    font-family: 'Cinzel', serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: #ffffff;
    max-width: 750px;
    line-height: 1.4;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.8), 0 2px 10px rgba(0,0,0,0.9);
    margin-bottom: 35px;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 38px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 140, 0, 0.45));
    border: 2px solid #ffd700;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: btnPulse 2s infinite ease-in-out;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), inset 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), inset 0 0 20px rgba(255, 215, 0, 0.6); }
}

.welcome-btn:hover {
    transform: scale(1.06);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 140, 0, 0.7));
    border-color: #ffffff;
    box-shadow: 0 0 50px rgba(255, 215, 0, 1);
}

/* Epilogue Modal Overlay & Glass Card */
#epilogue-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    background: rgba(4, 2, 8, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s ease, visibility 1.2s;
}

#epilogue-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.epilogue-card {
    background: rgba(18, 10, 30, 0.88);
    border: 2px solid rgba(255, 215, 0, 0.7);
    border-radius: 28px;
    padding: 35px;
    max-width: 580px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3), 0 10px 40px rgba(0,0,0,0.9);
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.photo-frame-container {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    margin-bottom: 24px;
}

.epilogue-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.epilogue-text-container {
    margin-bottom: 25px;
}

.epilogue-heading {
    font-family: 'Great Vibes', cursive;
    font-size: 2.8rem;
    color: #ffd700;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.epilogue-body {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #e2e2e2;
    margin-bottom: 12px;
}

.epilogue-body.highlighted {
    font-weight: 600;
    color: #ffda79;
    background: rgba(255, 215, 0, 0.1);
    padding: 10px 16px;
    border-radius: 14px;
    border-left: 3px solid #ffd700;
}

/* Photo Gallery Interactive Modal */
#photo-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    background: rgba(4, 2, 8, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s;
}

#photo-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.photo-modal-card {
    position: relative;
    background: rgba(20, 12, 32, 0.95);
    border: 2px solid #ffd700;
    border-radius: 24px;
    padding: 28px;
    max-width: 460px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.4), 0 10px 30px rgba(0,0,0,0.9);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-modal-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    color: #ffd700;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal-btn:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.modal-image-wrapper {
    width: 100%;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 20px;
}

.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-phrase-title {
    font-family: 'Great Vibes', cursive;
    font-size: 2.3rem;
    color: #ffd700;
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.modal-love-note {
    font-size: 0.92rem;
    color: #ffda79;
    margin-bottom: 20px;
    line-height: 1.5;
    font-style: italic;
}

.modal-action-btn {
    padding: 12px 28px;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.4));
    border: 1.5px solid #ffd700;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-action-btn:hover {
    background: rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

/* Top Floating Main Banner with High Contrast Glass Card */
#header-title-wrapper {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(8, 4, 15, 0.85);
    border: 1.5px solid rgba(255, 215, 0, 0.7);
    border-radius: 50px;
    padding: 10px 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 25px rgba(0,0,0,0.8), 0 0 15px rgba(255, 215, 0, 0.3);
    opacity: 0;
    transition: opacity 2s ease 1s;
    pointer-events: none;
}

#header-title-wrapper.visible {
    opacity: 1;
}

#header-title {
    font-family: 'Great Vibes', cursive;
    font-size: 2.6rem;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 0 8px #ffd700, 0 2px 4px #000000;
}

/* Music Player Widget (Top Right Corner on Desktop, Bottom Floating on Mobile) */
#music-player-widget {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 20;
    background: rgba(8, 4, 18, 0.92);
    border: 1.5px solid rgba(255, 215, 0, 0.8);
    border-radius: 20px;
    padding: 14px 20px;
    max-width: 360px;
    backdrop-filter: blur(14px);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3), 0 10px 25px rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 1.5s ease 1s, transform 0.3s ease;
}

#music-player-widget.visible {
    opacity: 1;
}

#music-player-widget:hover {
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.5);
}

.player-header {
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffda79;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding-bottom: 6px;
}

.player-header i {
    color: #ff4757;
    animation: pulseGlow 1.5s infinite;
}

.player-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-info {
    display: flex;
    flex-direction: column;
}

.song-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

.artist-name {
    font-size: 0.8rem;
    color: #ffc048;
    font-weight: 600;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.playlist-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.6);
    color: #ffd700;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.playlist-btn:hover {
    background: rgba(255, 215, 0, 0.35);
    border-color: #ffffff;
    color: #ffffff;
    transform: scale(1.1);
}

.playlist-btn.main-play {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 140, 0, 0.5));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Instruction Toast for Mobile & Desktop */
#instruction-toast {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(8, 4, 15, 0.85);
    border: 1.5px solid rgba(255, 215, 0, 0.6);
    border-radius: 30px;
    padding: 10px 26px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: #ffda79;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease 1.5s;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    text-align: center;
}

#instruction-toast.visible {
    opacity: 1;
}

/* Responsive Adjustments for Mobile Devices */
@media (max-width: 768px) {
    .welcome-title { font-size: 1.5rem; }
    .welcome-subtitle { font-size: 0.95rem; }
    .welcome-btn { font-size: 1rem; padding: 14px 28px; }
    .epilogue-card { padding: 22px; }
    .photo-frame-container { width: 170px; height: 170px; }
    .epilogue-heading { font-size: 2.2rem; }
    .epilogue-body { font-size: 0.88rem; }
    .photo-modal-card { padding: 20px; }
    .modal-image-wrapper { height: 200px; }
    
    /* Top Header Banner centered cleanly on top */
    #header-title-wrapper {
        top: 14px;
        left: 50%;
        transform: translateX(-50%);
        padding: 6px 18px;
        max-width: 92%;
    }
    #header-title {
        font-size: 1.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Music Player Widget placed at top under header banner on mobile */
    #music-player-widget {
        top: 68px;
        right: 50%;
        transform: translateX(50%);
        width: 92%;
        max-width: none;
        padding: 8px 14px;
    }
    .player-header { font-size: 0.68rem; margin-bottom: 4px; padding-bottom: 4px; }
    .song-name { font-size: 0.85rem; }
    .artist-name { font-size: 0.75rem; }
    .playlist-btn { width: 34px; height: 34px; font-size: 0.85rem; }
    .playlist-btn.main-play { width: 38px; height: 38px; font-size: 0.95rem; }

    #instruction-toast {
        font-size: 0.72rem;
        padding: 6px 14px;
        bottom: 14px;
        width: 92%;
    }
}
