@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&display=swap');

:root {
    --base-color: #e75a9b;
    --shadow-dark: #be4a80;
    --shadow-light: #ff6ac6;
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }

body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: var(--base-color);
    background-image: url('https://www.transparenttextures.com/patterns/soft-wallpaper.png');
    color: var(--text-primary);
}

#login-screen {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    /* TEMA ROSA RESTAURADO */
    background-image: url("http://googleusercontent.com/image_collection/image_retrieval/5677905973437496518");
    background-size: cover; background-position: center;
    z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    transition: opacity .5s, visibility .5s;
}
.login-box {
    background: var(--base-color);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    padding: 40px; border-radius: 20px;
    text-align: center; width: 90%; max-width: 400px;
}
.login-box h2 { font-family: 'Pacifico', cursive; margin-top: 0; color: var(--text-primary); text-shadow: 1px 1px 3px rgba(0,0,0,.3); }
.login-input { width: 100%; padding: 15px; margin-bottom: 20px; border-radius: 10px; border: none; background: var(--base-color); box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); color: #fff; font-size: 1em; text-align: center; }
.login-input::placeholder { color: rgba(255,255,255,.7); }
.login-button { width: 100%; padding: 15px; border-radius: 10px; border: none; background: linear-gradient(145deg,#fb6cb9,#d45a9b); box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); color: #fff; font-size: 1.1em; font-weight: 700; cursor: pointer; transition: all .2s; }
.login-button:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
#login-error { color: #ffdddd; margin-top: 15px; font-size: .9em; display: none; }
.remember-me-container { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--text-secondary); font-size: .9em; }
#remember-me { margin-right: 8px; }

#app-container { display: none; height: 100%; flex-direction: column; }

.page-container { flex-grow: 1; position: relative; display: flex; justify-content: center; align-items: center; padding: 20px 15px; overflow: hidden; }
.page { display: none; flex-direction: column; justify-content: flex-start; align-items: center; width: 100%; height: 100%; animation: fadeIn .6s; position: absolute; overflow-y: auto; padding-top: 20px; }
.page.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.bottom-nav { width: 100%; background: var(--base-color); display: flex; justify-content: space-around; padding: 15px 0; flex-shrink: 0; z-index: 10; box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light); }
.nav-btn { background: 0 0; border: none; color: rgba(255,255,255,.7); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 5px; transition: color .3s; }
.nav-btn .icon { width: 24px; height: 24px; fill: currentColor; transition: transform .3s; }
.nav-btn.active { color: var(--text-primary); }
.nav-btn.active .icon { transform: translateY(-2px) scale(1.1); }

.content-card { background: var(--base-color); border-radius: 30px; padding: 25px; text-align: center; width: 100%; max-width: 450px; margin: 10px 0; box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light); }
.content-card h2 { margin-top: 0; font-family: 'Pacifico', cursive; font-size: 2.2em; color: var(--text-primary); text-shadow: 2px 2px 4px rgba(0,0,0,.3); }

#page-home .polaroid-card { margin-top: 20px; }
.polaroid-card { background: #fff; padding: 15px 15px 70px; border-radius: 5px; transform: rotate(-3deg); width: 90%; max-width: 300px; position: relative; box-shadow: 0 10px 20px rgba(0,0,0,.3); margin-bottom: 30px; }
.polaroid-image { width: 100%; padding-bottom: 100%; background-size: cover; background-position: center; background-image: url(fotos1/foto_principal.jpg); }
.polaroid-caption { position: absolute; bottom: 15px; left: 15px; right: 15px; text-align: center; font-family: 'Kalam', cursive; font-size: 1.2em; color: #333; }
#romantic-quote { font-family: 'Dancing Script', cursive; font-size: 1.7em; text-shadow: 1px 1px 5px rgba(0,0,0,.5); margin: 20px 0; padding: 0 15px; }
#countdown { font-family: 'Dancing Script', cursive; font-size: 1.8em; font-weight: 700; }
#local-clock { font-family: 'Dancing Script', cursive; font-size: 1.6em; margin-top: 10px; opacity: .9; }
.label { font-size: .9em; color: var(--text-secondary); opacity: .8; }
#page-music { background-color: var(--base-color); justify-content: center; }
.music-player { width: 100%; max-width: 380px; padding: 20px; text-align: center; background: var(--base-color); border-radius: 20px; box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light); }
.cover-art { width: 200px; height: 200px; border-radius: 50%; margin: 0 auto 20px; background-size: cover; background-position: center; border: 5px solid var(--base-color); box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light); }
.cover-art.playing { animation: spin 12s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
#song-title { font-size: 1.5em; font-weight: 700; margin-bottom: 5px; color: var(--text-primary); text-shadow: 1px 1px 3px rgba(0,0,0,.3); }
#song-artist { font-size: 1em; color: var(--text-secondary); margin-bottom: 20px; }
.progress-container { width: 100%; cursor: pointer; margin-top: 20px; height: 8px; border-radius: 5px; box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); }
.progress-bar { width: 0%; height: 8px; background: linear-gradient(145deg,#ff78c4,#be4a80); border-radius: 5px; }
.time-display { display: flex; justify-content: space-between; font-size: .9em; color: var(--text-secondary); margin-top: 8px; }
.player-controls { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.player-controls .control-btn, .player-controls .play-pause-btn { background: var(--base-color); border: none; cursor: pointer; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: box-shadow .2s; }
.player-controls .control-btn { width: 50px; height: 50px; color: rgba(255,255,255,.8); box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); }
.player-controls .play-pause-btn { width: 70px; height: 70px; box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light); }
.player-controls .control-btn:active, .player-controls .play-pause-btn:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
.player-controls .control-btn svg { width: 22px; height: 22px; fill: currentColor; }
.player-controls .play-pause-btn svg { width: 30px; height: 30px; fill: #fff; }
.memories-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.custom-btn { background: linear-gradient(145deg,#fb6cb9,#d45a9b); color: #fff; border: none; border-radius: 50px; padding: 12px 25px; font-size: 1.1em; font-weight: 700; cursor: pointer; transition: all .3s; box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); display: flex; align-items: center; gap: 10px; }
.custom-btn:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
.custom-btn .icon { width: 22px; height: 22px; fill: #fff; }
.timeline { list-style: none; padding: 0; margin-top: 20px; position: relative; }
.timeline:before { content: ''; position: absolute; top: 0; bottom: 0; left: 20px; width: 3px; background-color: rgba(0,0,0,.1); border-radius: 3px; box-shadow: inset 1px 1px 2px #be4a80; }
.timeline-item { position: relative; padding-left: 60px; margin-bottom: 30px; }
.timeline-icon { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; background: var(--base-color); box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light); }
.timeline-icon svg { width: 22px; height: 22px; fill: #fff; }
.timeline-content { text-align: left; }
.timeline-content h3 { margin: 0 0 5px; font-family: 'Pacifico', cursive; font-size: 1.5em; color: var(--text-primary); text-shadow: 1px 1px 2px rgba(0,0,0,.2); }
.timeline-content p { margin: 0; color: var(--text-secondary); }
.dream-input-area { display: flex; margin-bottom: 20px; gap: 10px; }
#dream-input { flex-grow: 1; padding: 15px; border-radius: 10px; border: none; background: var(--base-color); box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); color: #fff; font-size: 1em; }
#add-dream-btn { background: linear-gradient(145deg,#fb6cb9,#d45a9b); color: #fff; border: none; border-radius: 10px; width: 50px; font-size: 1.5em; font-weight: 700; cursor: pointer; box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); transition: all .2s; }
#add-dream-btn:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
#dreams-list { list-style: none; padding: 0; margin: 0; width: 100%; text-align: left; }
.dream-item { display: flex; align-items: center; justify-content: space-between; background: var(--base-color); padding: 15px; border-radius: 15px; margin-bottom: 15px; box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light); }
.dream-item span { flex-grow: 1; }
.delete-dream-btn { background: 0 0; border: none; cursor: pointer; padding: 5px; }
.delete-dream-btn svg { width: 20px; height: 20px; fill: rgba(255,255,255,.7); transition: fill .3s; }
.delete-dream-btn:hover svg { fill: #fff; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,.8); backdrop-filter: blur(5px); }
.modal-content { position: relative; margin: auto; padding: 10px; width: 95%; max-width: 800px; top: 50%; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; }
.message-modal-content { background: rgba(0,0,0,.5); border-radius: 20px; padding: 30px; text-align: center; font-family: 'Dancing Script', cursive; font-size: 1.5em; line-height: 1.6; }
.message-modal-content h3 { font-family: 'Pacifico', cursive; font-size: 1.8em; color: var(--pink); }
.close { color: #fff; position: absolute; top: 0; right: 15px; font-size: 45px; font-weight: 700; cursor: pointer; z-index: 1001; }
.carousel-container { position: relative; }
.carousel-slide { display: none; }
.carousel-slide img { width: auto; height: auto; max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 15px; }
.prev, .next { cursor: pointer; position: absolute; top: 50%; padding: 16px; margin-top: -30px; color: #fff; font-weight: 700; font-size: 25px; transition: .6s ease; -webkit-user-select: none; user-select: none; background-color: rgba(0,0,0,.5); }
.next { right: 0; border-radius: 3px 0 0 3px; }
.chat-container { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--base-color); border-radius: 20px; box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light); overflow: hidden; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; flex-shrink: 0; border-bottom: 1px solid rgba(0,0,0,.1); box-shadow: inset 0 -5px 10px -5px var(--shadow-dark); }
.chat-header h2 { font-size: 1.5em; margin: 0; }
.external-link-btn { background: var(--base-color); border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; color: rgba(255,255,255,.8); box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light); transition: box-shadow .2s; }
.external-link-btn:active { box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); }
.external-link-btn svg { width: 20px; height: 20px; fill: currentColor; }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; }
.message { max-width: 70%; padding: 10px 15px; border-radius: 20px; margin-bottom: 10px; line-height: 1.4; word-wrap: break-word; }
.message img { max-width: 100%; border-radius: 15px; margin-top: 5px; }
.message.sent { background: var(--dark-pink); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.message.received { background: #f1f0f0; color: #333; align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-input-area { display: flex; padding: 10px; background: var(--base-color); box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); align-items: center; }
#chat-input { flex-grow: 1; padding: 12px; border-radius: 20px; border: none; background: var(--base-color); box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); color: #fff; margin: 0 10px; }
#chat-input::placeholder { color: rgba(255,255,255,.7); }
.input-action-btn { background: var(--base-color); box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light); border: none; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; flex-shrink: 0; }
.input-action-btn:active { box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); }
.input-action-btn svg { width: 20px; height: 20px; fill: #fff; }