/* ==========================================================================
   Digital Sanctuary - FINAL ORGANIZED STLESHEET
   ==========================================================================
   Structure:
   1.  Imports & Root Variables
   2.  Keyframe Animations
   3.  Base & Typography Styles
   4.  Core Layout & Navigation
   5.  Shared Components (Cards, Buttons, Forms)
   6.  Authentication
   7.  Section Backgrounds
   8.  Widget-Specific Styles
   9.  Doodle Corner
   10. Modals & Overlays
   11. Toast Notifications
   12. Mobile & Responsive Styles
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 1. IMPORTS & ROOT VARIABLES
/* -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Dancing+Script:wght@700&family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

:root {
    --bg-color: #F8F7FC;
    --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(252, 227, 236, 0.6));
    --card-border-color: rgba(255, 255, 255, 0.5);
    --primary-accent: #E91E63;
    --primary-accent-light: #FCE4EC;
    --primary-gradient: linear-gradient(45deg, #f472b6, #e91e63);
    --auth-button-gradient: linear-gradient(90deg, #E91E63 0%, #9C27B0 100%);
    --text-primary: #333;
    --text-secondary: #6b4b5b;
    --shadow-color: rgba(110, 80, 100, 0.15);
    --glow-color: rgba(233, 30, 99, 0.3);
    --heading-font: 'Dancing Script', cursive;
    --body-font: 'Poppins', sans-serif;
    --journal-font: 'Cormorant Garamond', serif;
    --danger-color: #e53935;
    --success-color: #43A047;
}

body.dark-theme {
    --bg-color: #0f172a;
    --card-bg: linear-gradient(145deg, rgba(30, 39, 66, 0.7), rgba(59, 39, 82, 0.6));
    --card-border-color: rgba(124, 111, 155, 0.3);
    --primary-accent: #f472b6;
    --primary-accent-light: rgba(244, 114, 182, 0.1);
    --primary-gradient: linear-gradient(45deg, #f472b6, #a855f7);
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(244, 114, 182, 0.4);
    --danger-color: #ef5350;
    --success-color: #66BB6A;
}

/* -------------------------------------------------------------------------- */
/* 2. KEYFRAME ANIMATIONS
/* -------------------------------------------------------------------------- */
@keyframes float {
	0% { transform: translateY(0px); }
	50% { transform: translateY(-10px); }
	100% { transform: translateY(0px); }
}
@keyframes icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(-10deg); }
    100% { transform: scale(1); }
}
@keyframes fm-stars-pan {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}
@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes twinkle-stars { from { transform: translateY(0px); } to { transform: translateY(-2000px); } }
@keyframes tick-pop { 0% { transform: scale(1); } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slide-in-up { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes twinkle { 0% { opacity: 0; } 50% { opacity: 0.7; } 100% { opacity: 0; } }
@keyframes shake-it { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-10px) rotate(-5deg); } 40% { transform: translateX(10px) rotate(5deg); } 60% { transform: translateX(-10px) rotate(-3deg); } 80% { transform: translateX(10px) rotate(3deg); } }
@keyframes save-fly-out { 0% { transform: scale(1) translateY(0); opacity: 1; } 50% { transform: scale(0.5) translateY(-50px) rotate(15deg); opacity: 1; } 100% { transform: scale(0) translateY(-500px) rotate(30deg); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(100%); opacity: 0; } }
@keyframes fly-into-jar { 0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; } 30% { transform: translate(50px, -80px) scale(0.8) rotate(180deg); opacity: 1; } 100% { transform: translate(120px, 150px) scale(0.2) rotate(360deg); opacity: 0; } }
@keyframes tumble-note { 0% { transform: translate(0, 0) rotate(var(--initial-rotate)); } 25% { transform: translate(var(--x1), var(--y1)) rotate(var(--r1)); } 50% { transform: translate(var(--x2), var(--y2)) rotate(var(--r2)); } 75% { transform: translate(var(--x3), var(--y3)) rotate(var(--r3)); } 100% { transform: translate(0, 0) rotate(var(--initial-rotate)); } }
@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--text-primary); }
}
@keyframes flip-next-page {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-180deg); }
}
@keyframes flip-prev-page {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(180deg); }
}
@keyframes notepad-flip-up-next {
    from { transform: perspective(2000px) rotateX(0deg); opacity: 1; }
    to { transform: perspective(2000px) rotateX(-180deg); opacity: 0; }
}
@keyframes notepad-flip-up-prev {
    from { transform: perspective(2000px) rotateX(0deg); opacity: 1; }
    to { transform: perspective(2000px) rotateX(180deg); opacity: 0; }
}
@keyframes pulse-heart {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}


/* -------------------------------------------------------------------------- */
/* 3. BASE & TYPOGRAPHY STYLES
/* -------------------------------------------------------------------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--body-font);
    color: var(--text-primary);
    margin: 0;
    /* MODIFIED: Removed padding-top from body */
    background-color: var(--bg-color);
    transition: background-color 0.5s, color 0.5s;
    overflow-x: hidden;
}

/* NEW: Padding is now applied only to the main app container */
#app-content {
    padding-top: 75px;
}

.parallax-layer {
    position: fixed;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    z-index: -1;
    background-repeat: repeat;
    will-change: transform;
    transition: color 0.5s ease, opacity 0.5s ease;
}

#parallax-bg-1 {
    background-image: url('data:image/svg+xml,%3Csvg width="500" height="500" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"%3E%3Cg stroke="currentColor" stroke-width="1.5" fill="none"%3E%3Cpath d="M250 50 L255 60 L265 62 L257 68 L260 78 L250 72 L240 78 L243 68 L235 62 L245 60Z"/%3E%3Cpath d="M80 400 L85 410 L95 412 L87 418 L90 428 L80 422 L70 428 L73 418 L65 412 L75 410Z"/%3E%3Cpath d="M450 200 L455 210 L465 212 L457 218 L460 228 L450 222 L440 228 L443 218 L435 212 L445 210Z"/%3E%3C/g%3E%3C/svg%3E');
    z-index: -3;
    opacity: 0.6;
}
#parallax-bg-2 {
    background-image: url('data:image/svg+xml,%3Csvg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"%3E%3Cg stroke="currentColor" stroke-width="2" fill="none"%3E%3Cpath d="M100 100 C 50 100, 50 150, 100 150 C 150 150, 150 100, 100 100" transform="rotate(45 100 125)"/%3E%3Cpath d="M300 300 C 250 300, 250 350, 300 350 C 350 350, 350 300, 300 300" transform="rotate(45 300 325)"/%3E%3C/g%3E%3C/svg%3E');
    z-index: -2;
    opacity: 0.4;
}
#parallax-bg-3 {
    background-image: url('data:image/svg+xml,%3Csvg width="600" height="600" viewBox="0 0 600 600" xmlns="http://www.w3.org/2000/svg"%3E%3Cg stroke="currentColor" stroke-width="1" fill="none"%3E%3Cpath d="M50 50 Q 150 0, 150 100 T 250 150"/%3E%3Cpath d="M550 550 Q 450 600, 450 500 T 350 450"/%3E%3C/g%3E%3C/svg%3E');
    z-index: -1;
    opacity: 0.3;
}
.parallax-layer { color: var(--primary-accent-light); }
body.dark-theme .parallax-layer { color: var(--card-border-color); }

h1, h2, h3, h4 { font-family: var(--heading-font); color: var(--text-primary); }
h2 { font-size: 3rem; }
h3 { font-size: 1.5rem; font-family: var(--body-font); font-weight: 600; }
p { line-height: 1.7; color: var(--text-secondary); }
.hidden { display: none !important; }


/* -------------------------------------------------------------------------- */
/* 4. CORE LAYOUT & NAVIGATION
/* -------------------------------------------------------------------------- */

.main-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; background: var(--card-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--card-border-color); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.logo { font-family: var(--heading-font); font-size: 2rem; color: var(--primary-accent); }
.header-controls { display: flex; gap: 15px; }

.feature-nav { position: sticky; top: 90px; display: flex; justify-content: center; background: var(--card-bg); backdrop-filter: blur(10px); padding: 8px; border-radius: 50px; box-shadow: 0 6px 25px var(--shadow-color); margin: 30px auto; width: fit-content; z-index: 900; border: 1px solid var(--card-border-color); }
.nav-item { text-decoration: none; color: var(--text-secondary); padding: 10px 20px; border-radius: 30px; font-weight: 500; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-item.active, .nav-item:hover { background-image: var(--primary-gradient); color: white; box-shadow: 0 4px 15px var(--glow-color); transform: translateY(-2px); }

/* --- Hamburger Menu --- */
.hamburger-btn { display: none; }
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    z-index: 1002;
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-nav.is-open {
    transform: translateX(0);
}
.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 1.5rem;
    color: var(--text-primary);
}
.mobile-nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
    background: var(--primary-accent-light);
    color: var(--primary-accent);
}
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.mobile-nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.content-container { width: 100%; display: flex; flex-direction: column; align-items: center; }
.feature-section { width: 100%; min-height: 95vh; padding: 80px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: background-color 0.5s ease; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-icon { width: 60px; height: 60px; background: var(--card-bg); color: var(--primary-accent); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 15px; box-shadow: 0 5px 15px var(--shadow-color); }
.section-header p { font-size: 1.2rem; margin-top: 5px; }

/* -------------------------------------------------------------------------- */
/* 5. SHARED COMPONENTS (Cards, Buttons, Forms)
/* -------------------------------------------------------------------------- */

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 10px 40px var(--shadow-color), inset 0 1px 4px rgba(255, 255, 255, 0.1);
    padding: 35px;
    width: 100%;
    max-width: 900px;
    text-align: left;
    border: 1px solid var(--card-border-color);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.4s ease-in-out;
}
body.dark-theme .card {
    box-shadow: 0 10px 40px var(--shadow-color), inset 0 1px 4px rgba(0, 0, 0, 0.2);
}
.card:hover {
    box-shadow: 0 15px 50px var(--shadow-color), inset 0 1px 4px rgba(255, 255, 255, 0.1), 0 0 25px var(--glow-color);
}
body.dark-theme .card:hover {
     box-shadow: 0 15px 50px var(--shadow-color), inset 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 25px var(--glow-color);
}
.card.is-visible { opacity: 1; transform: translateY(0); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--card-border-color); }
.card-header h3 { margin: 0; display: flex; align-items: center; gap: 10px; }

button {
    background-image: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--body-font);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
button:hover { transform: translateY(-3px); box-shadow: 0 7px 25px var(--glow-color); }
button:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 10px var(--glow-color);
}
button:disabled { cursor: not-allowed; filter: grayscale(50%); opacity: 0.7; transform: none; box-shadow: none; }
.btn-secondary { background: var(--card-bg); color: var(--text-primary); box-shadow: 0 4px 15px var(--shadow-color); }
.btn-secondary:hover { background: var(--primary-accent-light); color: var(--primary-accent); }

.icon-btn { padding: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#logout-btn { background: var(--card-bg); color: var(--text-primary); box-shadow: none; }
input, textarea { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--card-border-color); color: var(--text-primary); width: 100%; padding: 14px; border-radius: 12px; font-family: var(--body-font); font-size: 1rem; margin-bottom: 15px; transition: all 0.3s ease; }
input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: 0.8; }
input:focus, textarea:focus { outline: none; border-color: var(--primary-accent); box-shadow: 0 0 0 3px var(--primary-accent-light); background: var(--card-bg); }
.file-input-label { background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--card-border-color); padding: 12px 20px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: background-color 0.3s; }
.file-input-label:hover { background: var(--primary-accent-light); }
input[type="file"] { display: none; }
.delete-btn { position: absolute; top: 0; right: 0; width: 28px; height: 28px; border-radius: 0 4px 0 10px; background: var(--danger-color); color: white; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: none; box-shadow: -2px 2px 5px rgba(0,0,0,0.2); opacity: 0; transform: scale(0.5); transition: all 0.2s ease-in-out; z-index: 12; }
.gallery-photo-container:hover .delete-btn, .dream-card:hover .delete-btn, .timeline-item:hover .delete-btn { opacity: 1; transform: scale(1); }
.deletable-item { position: relative; }
.deletable-item.is-deleting .delete-btn {
    opacity: 1;
    transform: scale(1);
}

/* -------------------------------------------------------------------------- */
/* 6. AUTHENTICATION
/* -------------------------------------------------------------------------- */
#auth-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: transparent; 
    font-family: var(--body-font);
    color: var(--text-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: float 6s ease-in-out infinite;
}
.auth-logo .fa-heart-sparkle {
    font-size: 3rem;
    color: var(--primary-accent);
}
.auth-logo h1 {
    font-family: var(--heading-font);
    font-size: 4rem;
    color: var(--primary-accent);
}
.auth-header p {
    font-family: var(--journal-font);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

#auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 24px;
    box-shadow: 0 10px 40px var(--shadow-color);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

#auth-card-content {
    padding: 40px;
    text-align: center;
}
#auth-card-content h2 {
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}
.auth-tabs {
    display: flex;
    background-color: var(--primary-accent-light);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 30px;
}
body.dark-theme .auth-tabs {
    background-color: rgba(255,255,255,0.05);
}
.auth-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
}
.auth-tab-btn i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}
.auth-tab-btn.active {
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
/* NEW: Icon animation */
.auth-tab-btn.active i {
    animation: icon-pop 0.5s ease;
}

#auth-card form {
    text-align: left;
}
#auth-card form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}
#auth-card form input {
    background: var(--primary-accent-light);
    border: 1px solid transparent;
    color: var(--text-primary);
    padding-right: 40px; /* Space for the icon */
    font-weight: 500;
}
body.dark-theme #auth-card form input {
    background: rgba(255,255,255,0.05);
    border-color: var(--card-border-color);
}
#auth-card form input:focus {
    background: white;
    border-color: var(--primary-accent);
}
body.dark-theme #auth-card form input:focus {
    background: var(--card-bg);
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #ADB5BD;
    cursor: pointer;
}
body.dark-theme .toggle-password {
    color: var(--text-secondary);
}

#auth-card form button[type="submit"] {
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    /* MODIFIED: Use the main app gradient for a vibrant look */
    background-image: var(--primary-gradient);
    box-shadow: 0 4px 15px var(--glow-color);
}
#auth-card form button[type="submit"]:hover {
    box-shadow: 0 7px 25px var(--glow-color);
}
.form-description {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}
.form-description a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Styles for new registration modals */
.modal-header-animated {
    text-align: center;
    margin-bottom: 30px;
}
.modal-header-animated .star-burst {
    font-size: 3rem;
    animation: pulse-heart 1.5s ease-in-out infinite;
}
.modal-header-animated h2 {
    margin-bottom: 5px;
}
.modal-header-animated p {
    font-size: 1rem;
}
#invite-code-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-accent-light);
    border: 2px dashed var(--primary-accent);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
#invite-code-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary-accent);
}
#copy-code-btn {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--primary-accent) !important;
}

/* Hide the old auth container if it still exists */
#auth-container { display: none; }

/* -------------------------------------------------------------------------- */
/* 7. SECTION BACKGROUNDS
/* -------------------------------------------------------------------------- */

#home { background-image: linear-gradient(160deg, rgba(252, 227, 236, 0.9), rgba(232, 234, 246, 0.8)); }
#virtual-affection { background-image: linear-gradient(160deg, rgba(255, 243, 224, 0.9), rgba(251, 233, 231, 0.8)); }
#journal { background-image: linear-gradient(160deg, rgba(227, 242, 253, 0.9), rgba(238, 242, 255, 0.8)); }
#photo-gallery-section { background-image: linear-gradient(160deg, rgba(249, 251, 231, 0.9), rgba(255, 236, 232, 0.8)); }
#memory-jar { background-image: linear-gradient(160deg, rgba(237, 231, 246, 0.9), rgba(240, 232, 246, 0.8)); }
#dream-board-section { background-image: linear-gradient(160deg, rgba(252, 228, 236, 0.9), rgba(225, 245, 254, 0.8)); }
#timeline { background-image: linear-gradient(160deg, rgba(241, 248, 233, 0.9), rgba(224, 237, 224, 0.8)); }
#doodle-corner { background-image: linear-gradient(160deg, rgba(255, 236, 232, 0.9), rgba(241, 236, 255, 0.8));}

body.dark-theme #home { background-image: linear-gradient(160deg, rgba(40, 28, 52, 0.8), rgba(26, 35, 59, 0.6)); }
body.dark-theme #virtual-affection { background-image: linear-gradient(160deg, rgba(61, 44, 37, 0.8), rgba(60, 35, 47, 0.6)); }
body.dark-theme #journal { background-image: linear-gradient(160deg, rgba(26, 44, 61, 0.8), rgba(31, 58, 61, 0.6)); }
body.dark-theme #photo-gallery-section { background-image: linear-gradient(160deg, rgba(58, 61, 37, 0.8), rgba(29, 39, 58, 0.6)); }
body.dark-theme #memory-jar { background-image: linear-gradient(160deg, rgba(42, 37, 61, 0.8), rgba(57, 37, 61, 0.6)); }
body.dark-theme #dream-board-section { background-image: linear-gradient(160deg, rgba(61, 37, 51, 0.8), rgba(37, 57, 61, 0.6)); }
body.dark-theme #timeline { background-image: linear-gradient(160deg, rgba(42, 61, 37, 0.8), rgba(37, 61, 47, 0.6)); }
body.dark-theme #doodle-corner { background-image: linear-gradient(160deg, rgba(61, 42, 37, 0.8), rgba(37, 49, 61, 0.6));}


/* -------------------------------------------------------------------------- */
/* 8. WIDGET-SPECIFIC STYLES
/* -------------------------------------------------------------------------- */

/* ----- Home & Countdown ----- */
.welcome-section {
    position: relative;
    overflow: hidden;
}
#stars1, #stars2, #stars3 { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-repeat: repeat; background-position: 0 0; will-change: transform; }
#stars1 { background-image: radial-gradient(1px 1px at 20% 25%, white, transparent), radial-gradient(1px 1px at 80% 15%, white, transparent), radial-gradient(1px 1px at 50% 50%, white, transparent); background-size: 300px 300px; animation: twinkle-stars 200s linear infinite; }
#stars2 { background-image: radial-gradient(1.5px 1.5px at 10% 85%, #E5E7EB, transparent), radial-gradient(1.5px 1.5px at 60% 70%, #E5E7EB, transparent), radial-gradient(2px 2px at 90% 40%, white, transparent); background-size: 500px 500px; animation: twinkle-stars 150s linear infinite; }
#stars3 { background-image: radial-gradient(2.5px 2.5px at 70% 90%, #9CA3AF, transparent), radial-gradient(3px 3px at 30% 10%, white, transparent); background-size: 800px 800px; animation: twinkle-stars 100s linear infinite; }

#welcome-message { font-size: 5rem; text-shadow: 0 0 20px var(--glow-color); text-align: center; position: relative; z-index: 2; }
.subtitle { color: var(--text-primary); text-align: center; position: relative; z-index: 2; }
.countdown-container { margin-top: 40px; position: relative; z-index: 2; }
.countdown-header { font-size: 1.2rem; font-weight: 500; margin-bottom: 25px; text-align: center; }
.countdown-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.time-block {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    box-shadow: 0 10px 40px var(--shadow-color);
    border-radius: 24px;
    min-width: 180px; /* Changed from width to allow expansion */
    min-height: 180px; /* Changed from height */
    height: auto; /* Allow height to adjust to content */
    padding: 20px 30px; /* Added padding for better spacing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: float 6s ease-in-out infinite;
}
.time-block:hover { transform: translateY(-10px) !important; box-shadow: 0 15px 50px var(--shadow-color), 0 0 25px var(--glow-color); animation-play-state: paused; }
.time-block:nth-child(2) { animation-delay: -1.5s; }
.time-block:nth-child(3) { animation-delay: -3s; }
.time-block:nth-child(4) { animation-delay: -4.5s; }
.time-block span {
    font-family: var(--timer-font);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--primary-accent);
    line-height: 1.1;
    word-break: break-all; /* Prevent overflow for very long numbers */
    text-align: center; /* Ensure number stays centered */
}
.time-block label { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--text-secondary); }
.time-block span.ticking { animation: tick-pop 0.3s ease-in-out; }

/* ----- Virtual Affection & Constellation ----- */
.user-toggle { display: flex; background: rgba(0,0,0,0.1); border-radius: 12px; padding: 5px; }
body.dark-theme .user-toggle { background: rgba(255,255,255,0.05); }
.user-toggle-btn { flex: 1; background: transparent; color: var(--text-secondary); padding: 8px 10px; font-size: 1rem; position: relative; border: none; border-radius: 8px; transition: all 0.3s ease; }
.user-toggle-btn.active { background: var(--card-bg); color: var(--primary-accent); }
.notification-badge { position: absolute; top: -5px; right: -5px; background-color: #e74c3c; color: white; border-radius: 50%; width: 22px; height: 22px; font-size: 0.75rem; font-weight: 700; display: flex; justify-content: center; align-items: center; border: 2px solid var(--card-bg); transform: scale(0); transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.notification-badge.visible { transform: scale(1); }
.interactions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin: 25px 0; }
.interaction-btn { background-color: var(--card-bg); color: var(--text-primary); border: 1px solid var(--card-border-color); box-shadow: none; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; transition: all 0.3s ease; }
.interaction-btn:hover { background-color: var(--primary-accent-light); color: var(--primary-accent); transform: translateY(-2px); box-shadow: 0 4px 10px var(--shadow-color); border-color: transparent; }
.counts-display-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--card-border-color); }
.count-display-item { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative;}
.count-display-item::before { font-family: sans-serif; font-size: 1.8rem; }
.count-display-item[data-type="send-kiss"]::before { content: '\1F48B'; } 
.count-display-item[data-type="send-hug"]::before { content: '\1F917'; } 
.count-display-item[data-type="thinking-of-you"]::before { content: '\1F970'; } 
.count-display-item[data-type="missing-you"]::before { content: '\1F614'; }
.count-circle { width: 70px; height: 70px; border-radius: 50%; background-color: rgba(0,0,0,0.05); border: 4px solid var(--card-border-color); font-size: 1.8rem; font-weight: 600; color: var(--primary-accent); display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.count-display-item:hover .count-circle { border-color: var(--primary-accent-light); transform: scale(1.05); }
.card-actions { display: flex; justify-content: center; gap: 15px; margin-top: 25px; border-top: 1px solid var(--card-border-color); padding-top: 25px; }
.stats-container-hidden { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0 !important; padding-top: 0 !important; }
#stats-container { transition: all 0.7s ease-in-out; }
#stats-container.stats-container-visible { margin-top: 25px; max-height: 500px; opacity: 1; }
.constellation-header { display: flex; align-items: center; justify-content: space-between; }
.nav-arrow { background: var(--card-bg) !important; color: var(--text-primary) !important; box-shadow: none !important; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.constellation-wrapper { position: relative; width: 100%; height: 350px; background: linear-gradient(180deg, #1d2b4a 0%, #0f172a 100%); border-radius: 15px; margin-top: 15px; box-shadow: inset 0 0 40px rgba(0,0,0,0.5); }
#constellation-canvas { display: block; width: 100%; height: 100%; }
#constellation-tooltip { position: fixed; background: rgba(0, 0, 0, 0.8); color: white; padding: 10px 15px; border-radius: 8px; z-index: 1005; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.2); }
#constellation-tooltip.is-visible { opacity: 1; }
#constellation-tooltip h4 { color: white; margin-bottom: 8px; font-family: var(--body-font); }
#constellation-tooltip p { color: #ddd; margin: 0; line-height: 1.5; font-size: 0.9rem;}

/* ----- Journal Widget (Cover) ----- */
.journal-widget-wrapper.is-visible { opacity: 1; transform: translateY(0); }
#open-journal-button { width: 280px; height: 400px; position: relative; cursor: pointer; transition: transform 0.4s ease, box-shadow 0.4s ease; }
#open-journal-button:hover { transform: scale(1.05) rotate(-3deg); box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.book-spine { position: absolute; width: 40px; height: 100%; background: #4E342E; left: 0; top: 0; border-radius: 4px 0 0 4px; }
.book-front-cover { 
    position: absolute; 
    width: calc(100% - 20px); 
    height: 100%; 
    left: 20px; 
    background-image: linear-gradient(to right, #8D6E63, #6D4C41); 
    border-radius: 2px 8px 8px 2px; 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 5px 20px rgba(0,0,0,0.3); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    gap: 15px;
    overflow: hidden; 
}
.book-front-cover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><path fill="%23000" fill-opacity="1" d="M1 3h1v1H1V3zm2-2h1v1H3V1z"></path></svg>');
    background-size: 3px 3px;
    opacity: 0.05;
    pointer-events: none;
}
.book-title-text { font-family: var(--heading-font); font-size: 2.5rem; color: rgba(255, 255, 255, 0.7); }
.book-initials-text {
    font-family: var(--heading-font);
    font-size: 3rem;
    padding: 5px 15px;
    border-radius: 5px;
    color: #FFD700;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.5);
    border: 2px double rgba(255, 215, 0, 0.3);
}

/* ----- Photo Gallery ----- */
#add-gallery-form { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 15px; padding: 20px; background: rgba(0,0,0,0.05); border-radius: 15px; margin-bottom: 30px; }
body.dark-theme #add-gallery-form { background: rgba(255,255,255,0.05); }

.gallery-container {
    padding: 20px;
    width: 100%;
    column-count: 4;
    column-gap: 15px;
}
.gallery-photo-container {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    cursor: pointer;
    background: white;
    padding: 10px;
    padding-bottom: 50px;
    border-radius: 4px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
    position: relative;
    opacity: 0;
    transform: rotate(var(--random-rotation, 0deg));
}
.gallery-photo-container.is-visible { animation: slide-in-up 0.6s ease forwards; }
body.dark-theme .gallery-photo-container { background: #374151; border-color: #4b5563; }

.gallery-photo-container:hover {
    z-index: 10;
    box-shadow: 0 10px 25px var(--shadow-color);
    transform: scale(1.03) translateY(var(--translate-y, 0)) rotate(var(--random-rotation, 0deg)) !important;
}
.gallery-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}
.photo-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    font-family: var(--heading-font);
    font-size: 1.2rem;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark-theme .photo-caption { color: var(--text-secondary); }

.replay-doodle-overlay {
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 50px;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 2px;
    pointer-events: none;
}
.gallery-photo-container:hover .replay-doodle-overlay {
    opacity: 1;
    pointer-events: all;
}
.replay-doodle-btn {
    background: white !important;
    color: var(--primary-accent) !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

/* ----- Dream Board ----- */
.dream-board-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background-color: #D2B48C;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    padding: 30px;
    border-radius: 16px;
    border: 10px solid #8D6E63;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.4);
}
.dream-column h3 { margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,0.1); display: flex; align-items: center; gap: 10px; color: #6D4C41; }
.dream-container { display: flex; flex-direction: column; gap: 20px; }

.dream-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform: rotate(var(--random-rotation, 0deg));
    display: flex; /* Make it a flex container */
    flex-direction: column; /* Stack children vertically */
}
body.dark-theme .dream-card { background: #E5E7EB; border-color: #444; }
.dream-card:hover { transform: scale(1.05) rotate(0deg) !important; z-index: 10; }
.dream-card::before {
    content: '';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    background: var(--primary-accent);
}
/* --- NEW: Styles for dream content --- */
.dream-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}
.dream-card-content {
    padding: 15px;
    flex-grow: 1; /* Allow content to fill space */
    /* Add word wrapping */
    overflow-wrap: break-word;
    word-break: break-word;
}
.dream-card-tag { display: inline-block; padding: 5px 12px; background-color: #FFFDE7; color: #555; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 10px; }
.dream-card h4 { font-family: var(--heading-font); font-size: 1.6rem; color: #333; margin: 0; }
.dream-card-description {
    font-size: 0.95rem;
    color: #555;
    margin-top: 10px;
    line-height: 1.5;
}

.dream-card-footer {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 15px;
    border-top: 1px dashed #ccc;
    margin-top: auto; /* Push footer to the bottom */
}
.dream-author { font-size: 0.9rem; font-style: italic; color: #777; }
.dream-achieve-btn, .dream-undo-btn { padding: 8px 16px; font-size: 0.9rem; font-weight: 600; }
.dream-achieved-info { display: flex; align-items: center; gap: 15px; font-weight: 600; color: #4CAF50; }

/* ----- Memory Jar ----- */
#memory-jar-interactive-area { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 20px; }
#the-jar { position: relative; width: 100%; max-width: 350px; height: 400px; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 210"><defs><linearGradient id="g" x1="0.5" y1="0" x2="0.5" y2="1"><stop offset="0%" stop-color="%23E0E0E0" stop-opacity="0.5"/><stop offset="100%" stop-color="%23BDBDBD" stop-opacity="0.6"/></linearGradient></defs><path d="M10,20 H140 V30 A10,10 0 0 1 130,40 H20 A10,10 0 0 1 10,30 V20 Z" fill="%23D7CCC8"/><path d="M20,40 C20,55 5,55 5,70 L5,190 C5,210 25,210 35,210 H115 C125,210 145,210 145,190 L145,70 C145,55 130,55 130,40 Z" fill="url(%23g)" stroke="%23B0BEC5" stroke-width="2"/></svg>'); background-size: contain; background-repeat: no-repeat; background-position: center; }
.memory-note { font-family: 'Dancing Script', cursive; font-size: 1.1rem; color: #333; padding: 15px; border-radius: 5px; box-shadow: 2px 2px 8px rgba(0,0,0,0.15); position: absolute; max-width: 150px; word-wrap: break-word; text-align: center; }
.memory-note.tumbling { animation: tumble-note 0.6s ease-in-out; }
.memory-note .delete-btn { top: -8px; right: -8px; width: 22px; height: 22px; font-size: 12px; border: 2px solid white; }
.memory-note:hover .delete-btn { opacity: 1; transform: scale(1); }
#memory-spotlight { background: var(--primary-accent-light); padding: 15px; border-radius: 12px; width: 100%; text-align: center; color: var(--primary-accent); font-weight: 500; }
#the-jar.shaking { animation: shake-it 0.5s cubic-bezier(.36,.07,.19,.97) both; }
.note-pink { background: linear-gradient(135deg, #FCE4EC, #F8BBD0); } .note-blue { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); } .note-green { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); } .note-yellow { background: linear-gradient(135deg, #FFFDE7, #FFF59D); }
body.dark-theme .memory-note { color: var(--text-primary); }
body.dark-theme .note-pink { background: linear-gradient(135deg, #5c2c3b, #4a212e); } body.dark-theme .note-blue { background: linear-gradient(135deg, #2c3e5c, #212e4a); } body.dark-theme .note-green { background: linear-gradient(135deg, #2c5c3b, #214a2e); } body.dark-theme .note-yellow { background: linear-gradient(135deg, #5c5b2c, #4a4921); }
.flying-paper { position: absolute; width: 50px; height: 50px; background-color: #FFFDE7; border: 1px solid #ccc; border-radius: 4px; z-index: 100; animation: fly-into-jar 0.8s ease-in forwards; }

/* ----- Timeline ----- */
#timeline-widget {
    position: relative;
    padding: 2rem 0;
    margin-top: 2rem;
    max-width: 900px;
}

#timeline-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%; /* Centered line */
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary-accent-light);
    border-radius: 2px;
}
body.dark-theme #timeline-widget::before {
    background: rgba(124, 111, 155, 0.3);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item-left {
    left: 0;
}
.timeline-item-right {
    left: 50%;
}
.timeline-item-left .timeline-content {
    text-align: right;
}

.timeline-dot {
    position: absolute;
    top: 25px;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 3px solid var(--primary-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item-left .timeline-dot {
    right: -24px;
}
.timeline-item-right .timeline-dot {
    left: -24px;
}

.timeline-content {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border-color);
    padding: 20px 25px;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow-wrap: break-word;
    word-break: break-word;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--glow-color);
}
.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 8px 30px var(--shadow-color);
}
.timeline-item-left .delete-btn, .timeline-item-right .delete-btn {
    top: -12px;
    width: 28px;
    height: 28px;
    border-radius: 50%; /* Make it circular */
    border: 2px solid var(--bg-color); /* Add a border to lift it off the card */
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.timeline-item-right .delete-btn {
    left: -14px; /* Position outside on the left */
    right: auto;
}

.timeline-item-left .delete-btn {
    right: -14px; /* Position outside on the right */
    left: auto;
}

.timeline-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border-color);
}
.timeline-item-left .timeline-header {
    align-items: flex-end;
}
.timeline-item-right .timeline-header {
    align-items: flex-start;
}
.timeline-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-family: var(--body-font);
}
.timeline-date {
    font-family: var(--body-font);
    font-weight: 600;
    color: var(--primary-accent);
}

.timeline-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 10px;
}
.timeline-item-left .timeline-location {
    justify-content: flex-end;
}

/* ... (the rest of the CSS is unchanged until the Modals section) ... */

.timeline-modal-content {
    max-width: 600px;
    /* NEW: Set a max height and make it a flex container */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
#timeline-modal-form {
    /* NEW: Make form a flex container that fills available space */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden; /* Prevent the form itself from scrolling */
}
#timeline-modal-form h2 {
    text-align: center;
    margin-bottom: 20px; /* Reduced margin */
    flex-shrink: 0; /* Prevent title from shrinking */
}

/* NEW: This is the core of the fix. This wrapper will scroll. */
.form-fields-wrapper {
    flex-grow: 1; /* Takes up all available space */
    overflow-y: auto; /* Enables vertical scrolling ONLY when needed */
    padding: 0 15px; /* Adds some side padding for the scrollbar */
    margin: 0 -15px; /* Compensates for the padding to keep content aligned */
}

#timeline-modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
#timeline-modal-form input[type="text"],
#timeline-modal-form input[type="date"],
#timeline-modal-form input[type="time"],
#timeline-modal-form textarea {
    margin-bottom: 20px;
}
#timeline-modal-form textarea {
    min-height: 100px;
    resize: vertical;
}
.event-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}
.event-type-selector input[type="radio"] {
    display: none;
}
.event-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: var(--primary-accent-light);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-secondary);
}
body.dark-theme .event-type-btn {
    background: rgba(255,255,255,0.05);
}
.event-type-btn .event-icon {
    font-size: 1.8rem;
}
.event-type-selector input[type="radio"]:checked + .event-type-btn {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    box-shadow: 0 0 15px var(--glow-color);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    border-top: 1px solid var(--card-border-color);
    padding-top: 20px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}
#save-moment-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}
.timeline-content {
    background: #FFFCFE; /* A slightly pinkish, opaque white */
    box-shadow: 0 5px 20px var(--shadow-color); /* Add a subtle shadow to lift it */
    backdrop-filter: none; /* No longer needed with an opaque background */
}

/* MODIFICATION: Add a distinct background for dark mode as well */
body.dark-theme .timeline-content {
    background: #2c3347; /* A unique dark blue/purple, different from the default dark card */
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 40px; /* This bridges the padding gap */
    height: 3px;
    background: var(--primary-accent-light);
    top: 46px; /* Aligns vertically with the center of the dot */
    z-index: 1;
}

.timeline-item-left::after {
    right: 0;
}

.timeline-item-right::after {
    left: 0;
}

/* NEW: Add a colored accent border for better distinction */
.timeline-item-right .timeline-content {
    border-left: 4px solid var(--primary-accent-light);
}

.timeline-item-left .timeline-content {
    border-right: 4px solid var(--primary-accent-light);
}

/* MODIFICATION: Make the hover effect more pronounced */
.timeline-item:hover .timeline-content {
    border-color: var(--primary-accent); /* Now all 4 borders will turn to the main accent color */
}

body.dark-theme .timeline-item::after {
    background: rgba(124, 111, 155, 0.3);
}

/* -------------------------------------------------------------------------- */
/* 9. DOODLE CORNER
/* -------------------------------------------------------------------------- */

#doodle-corner { width: 100%; max-width: 1200px; display: flex; justify-content: center; align-items: center;}
#doodle-choice-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.doodle-choices { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.choice-card { background: var(--card-bg); border: 1px solid var(--card-border-color); padding: 40px; border-radius: 20px; text-align: center; width: 300px; cursor: pointer; transition: all 0.3s ease; box-shadow: var(--shadow-color) 0px 8px 24px; }
.choice-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-color) 0px 16px 32px; }
.choice-card i { font-size: 3rem; color: var(--primary-accent); margin-bottom: 15px; }
.choice-card h3 { font-family: var(--body-font); margin-bottom: 5px; }
#doodle-interface { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; }
#doodle-canvas-container { width: 100%; background-color: #FBF8F3; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAACQSURBVHic7Zs/EoAgCERd+v+f3d2sK8QLns2plLa2gklrGgA4n83H1wFAPdf6T10EwAhgBLACGAEsAIYASwA2m82+HwwnY3j3jN2tA3sC2Hy8YwSwAxgBrABGACuAEcAIYASwAxgBrABGACuAEcAIYASwAxgBrECd7/uXwzHxAZ9eHwz/i2b9/o9/AMAnb2lI0iLFAAAAAElFTSuQmCC'); border-radius: 16px; box-shadow: var(--shadow-color) 0px 10px 30px; overflow: hidden; transition: height 0.5s ease-in-out; }
#doodle-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
#doodle-toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; background: var(--card-bg); padding: 10px; border-radius: 50px; box-shadow: var(--shadow-color) 0px 5px 15px; }
#doodle-toolbar .size-picker .size-dot {
    background-color: var(--text-secondary);
    border-radius: 50%;
    width: var(--dot-size) !important;
    height: var(--dot-size) !important;
    transition: background-color 0.3s ease;
}
#doodle-toolbar .size-picker .size-dot.active {
    background-color: var(--primary-accent);
}
.tool-group { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.tool-group:not(:last-child) { border-right: 1px solid var(--card-border-color); }
#doodle-toolbar button { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: transparent; border: 2px solid transparent; color: var(--text-secondary); box-shadow: none; }
#doodle-toolbar button:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }
#doodle-toolbar button:disabled:hover { color: var(--text-secondary); }
#doodle-toolbar button.active { border-color: var(--primary-accent); color: var(--primary-accent); }
.color-swatch { width: 30px !important; height: 30px !important; border-radius: 50% !important; border: 2px solid rgba(0,0,0,0.1) !important; }
.color-swatch.active { transform: scale(1.1); box-shadow: 0 0 0 3px var(--primary-accent); }
.size-picker .size-dot { background-color: #888; border-radius: 50%; }
.size-picker .size-dot.active { background-color: var(--primary-accent); }
.doodle-actions { display: flex; gap: 15px; justify-content: center; }
#save-doodle-btn { border-radius: 50px; }
.saving-animation { animation: save-fly-out 1s ease-in-out forwards; }
.partner-cursor { position: fixed; width: 24px; height: 24px; background: var(--primary-accent); border-radius: 50%; border: 2px solid white; transform: translate(-50%, -50%); pointer-events: none; z-index: 1100; opacity: 0; transition: opacity 0.3s, transform 0.1s linear; }
.partner-cursor.visible { opacity: 1; }
.cursor-initial { position: absolute; top: 25px; left: 25px; background: black; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }

/* -------------------------------------------------------------------------- */
/* 10. MODALS & OVERLAYS
/* -------------------------------------------------------------------------- */

/* ----- Generic Modal ----- */
.modal-overlay { background: rgba(18, 18, 28, 0.6); backdrop-filter: blur(8px); position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 1001; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.modal-overlay:not(.hidden) { opacity: 1; pointer-events: all; }
.modal-content { background: var(--card-bg); border: 1px solid var(--card-border-color); padding: 30px; border-radius: 20px; width: 90%; max-width: 500px; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); position: relative; }
.modal-overlay:not(.hidden) .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 15px; right: 15px; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.1); color: var(--text-primary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s ease; z-index: 10; }
.close-modal:hover { background: rgba(0,0,0,0.2); transform: rotate(90deg); }

/* ----- Doodle Modals ----- */
.gallery-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; max-height: 50vh; overflow-y: auto; margin-top: 20px; }
.picker-photo-container { border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.2s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.picker-photo-container:hover { transform: scale(1.05); }
.picker-photo-container img { width: 100%; height: 150px; object-fit: cover; display: block; }
#doodle-save-preview { width: 100%; max-height: 30vh; object-fit: contain; border-radius: 8px; margin-bottom: 20px; background: #eee; }

/* ----- Doodle Replay Modal ----- */
#doodle-replay-canvas-container {
    width: 100%;
    height: 60vh;
    background: #FBF8F3;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
#replay-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
#replay-bg-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
#doodle-replay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}
#replay-controls {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 15px;
}
#replay-progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: rgba(0,0,0,0.1);
}
#replay-progress-bar::-webkit-progress-bar { background: rgba(0,0,0,0.1); border-radius: 5px; }
#replay-progress-bar::-webkit-progress-value { background-image: var(--primary-gradient); border-radius: 5px; transition: width 0.1s linear; }

.speed-control { display: flex; background: rgba(0,0,0,0.1); border-radius: 8px; padding: 3px; }
.speed-control button { background: transparent !important; box-shadow: none !important; color: var(--text-secondary) !important; padding: 5px 10px !important; font-size: 0.8rem !important; border-radius: 6px; }
.speed-control button.active { background: var(--card-bg) !important; color: var(--primary-accent) !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }

/* ----- Affection Log Modal ----- */
.modal-lg { max-width: 800px; }
#affection-log-content { max-height: 60vh; overflow-y: auto; padding-right: 10px; }
.log-date-group { margin-bottom: 25px; }
.log-date-header { font-family: var(--body-font); font-weight: 600; color: var(--primary-accent); margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--card-border-color); }
.log-entry-item { display: flex; align-items: center; gap: 15px; padding: 12px 10px; border-radius: 8px; transition: background-color 0.2s ease; }
.log-entry-item.unread { background-color: var(--primary-accent-light); }
.log-entry-icon { font-size: 1.5rem; }
.log-entry-text { flex-grow: 1; }
.log-entry-sender { font-weight: 600; }
.log-entry-time { font-size: 0.9rem; color: var(--text-secondary); }

/* --- Journal Modal --- */
.waiting-for-you-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    padding: 20px;
}
.pulsating-heart {
    font-size: 4rem;
    animation: pulse-heart 1.5s ease-in-out infinite;
}

/* --- NEW: Style for the grey "not written yet" heart --- */
.pulsating-heart-grey {
    font-size: 4rem;
    opacity: 0.5;
    /* A more subtle pulse animation */
    animation: pulse-heart 2.5s ease-in-out infinite;
}

.waiting-message {
    text-align: center;
    font-style: italic;
    font-family: var(--journal-font); /* Using the elegant journal font */
    font-size: 1.2rem; /* Slightly larger */
    color: var(--text-secondary);
    line-height: 1.6;
}

#journal-modal.hidden { display: flex !important; visibility: hidden; opacity: 0; }
#open-journal-button { transition: transform 0.6s ease-in-out, opacity 0.5s ease; }
#open-journal-button.is-opening { opacity: 0; transform: scale(3); }

#journal-modal-content { 
    background: transparent; border: none; box-shadow: none; 
    width: 90vw; max-width: 1000px; height: 90vh; max-height: 700px; 
    padding: 0; position: relative;
    transform: scale(0.3);
    transition: transform 0.6s ease-in-out;
}
#journal-modal:not(.hidden) #journal-modal-content {
    transform: scale(1);
}

.book { 
    width: 100%; height: 100%; display: flex; 
    background-image: linear-gradient(to right, #4a3c35, #3a2e29, #4a3c35);
    box-shadow: 0 25px 60px -15px rgba(0,0,0,0.6); 
    perspective: 4000px; 
    border-radius: 10px;
    position: relative; /* Needed for bookmark positioning */
}
.book-page { 
    flex: 1; 
    background-color: #FBF8F3; 
    border: 1px solid #e0dccc; 
    padding: 40px 50px; 
    position: relative; 
    overflow-y: auto; 
    display: flex; flex-direction: column;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAGNJREFUaAXt0AENAAAMwqD3T21bDR8k97uBACQkISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhIZkHYq0BE8/n2f4AAAAASUVORK5CYII=');
}
#journal-left-page { 
    box-shadow: inset 25px 0 30px -20px rgba(0,0,0,0.4); 
    border-radius: 10px 0 0 10px; 
}
#journal-right-page { 
    box-shadow: inset -25px 0 30px -20px rgba(0,0,0,0.4); 
    border-radius: 0 10px 10px 0; 
}
.journal-date-header { 
    font-family: var(--heading-font); 
    font-size: 1.8rem; text-align: center; color: #5a4a42; 
    padding-bottom: 15px; margin-bottom: 20px; 
    border-bottom: 2px solid #dcd3c9; 
}
.journal-entry-area { 
    font-family: var(--journal-font); 
    font-size: 1.1rem; line-height: 2; color: #4a3c35; 
    white-space: pre-wrap; flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word; 
}
.typing-effect::after { content: ''; display: inline-block; width: 2px; height: 1.1rem; background-color: #4a3c35; margin-left: 5px; animation: blink-cursor 1s step-end infinite; vertical-align: text-bottom; }
.journal-entry-area p { font-family: var(--journal-font); color: inherit; font-size: 1.1rem; line-height: 2;}
.journal-entry-area textarea { font-family: var(--journal-font) !important; font-size: 1.1rem !important; line-height: 2 !important; color: #4a3c35 !important; background: transparent; border: none; resize: none; }
.journal-signature { font-family: var(--heading-font); font-size: 2rem; text-align: right; margin-top: 20px; color: #7a6a62; }

/* --- MODIFIED: Journal Nav and Bookmark --- */
.journal-nav { 
    width: 100%; display: flex; justify-content: space-between; align-items: center; 
    position: absolute; bottom: 20px; left: 0;
    padding: 0 40px;
    z-index: 20;
}
.journal-nav-btn { 
    background: rgba(0,0,0,0.2) !important; color: white !important; 
    border: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important; 
    padding: 10px !important; 
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.3s ease; 
    font-family: var(--body-font); font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border-radius: 50% !important;
    width: 44px; height: 44px;
}
.journal-nav-btn:hover { background: rgba(0,0,0,0.4) !important; transform: translateY(-2px); }

/* --- NEW: Top Ribbon Bookmark Style for Desktop --- */
.journal-bookmark {
    position: absolute;
    top: 0;
    left: 75%; /* Shifted to the right */
    transform: translateX(-50%);
    width: 50px;
    height: 90px;
    background: var(--primary-accent);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
    display: flex;
    padding-top: 10px;
    justify-content: center;
    font-size: 1.2rem;
}
.journal-bookmark:hover {
    height: 95px;
    background: #f472b6;
}
.journal-bookmark.active i {
    color: #FFD700;
    transform: scale(1.1);
}

.journal-close-btn { 
    position: absolute; top: -15px; right: -15px; z-index: 20; 
    background: rgba(0,0,0,0.2) !important; color: white !important; 
    border: 1px solid rgba(255,255,255,0.2) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important; 
    width: 44px; height: 44px; border-radius: 50% !important; padding: 0 !important; 
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; 
}
.journal-close-btn:hover { background: rgba(0,0,0,0.4) !important; transform: translateY(-2px); }

/* --- Page Flip Styles --- */
.page-flipper { 
    position: absolute; top: 0; width: 50%; height: 100%; 
    transform-style: preserve-3d; z-index: 15; 
}
.page-flipper .page-front, .page-flipper .page-back { 
    position: absolute; width: 100%; height: 100%; 
    backface-visibility: hidden; 
    background-color: #FBF8F3; 
    padding: 40px 50px; border: 1px solid #e0dccc; color: #4a3c35; 
    overflow: hidden; 
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAGNJREFUaAXt0AENAAAMwqD3T21bDR8k97uBACQkISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhIZkHYq0BE8/n2f4AAAAASUVORK5CYII=');
}
.page-flipper .page-back { transform: rotateY(180deg); }
.page-flipper.flipping-next { left: 50%; animation: flip-next-page 1.5s cubic-bezier(0.61, 0.04, 0.35, 1) forwards; transform-origin: left center; }
.page-flipper.flipping-prev { left: 0%; animation: flip-prev-page 1.5s cubic-bezier(0.61, 0.04, 0.35, 1) forwards; transform-origin: right center; }

.notepad-flipper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    transform-origin: top center;
    background-color: #FBF8F3;
    border: 1px solid #e0dccc;
    padding: 20px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAGNJREFUaAXt0AENAAAMwqD3T21bDR8k97uBACQkISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhIZkHYq0BE8/n2f4AAAAASUVORK5CYII=');
    overflow: hidden;
}
.notepad-flipper.flipping-up-next {
    animation: notepad-flip-up-next 0.8s ease-in-out forwards;
}
.notepad-flipper.flipping-up-prev {
    animation: notepad-flip-up-prev 0.8s ease-in-out forwards;
}

/* ----- Confirmation Modal ----- */
.confirmation-buttons { display: flex; justify-content: flex-end; gap: 15px; margin-top: 20px; }
.btn-danger { background: var(--danger-color); }

/* ----- Lightbox Modal ----- */
#lightbox-content { background: transparent; padding: 0; width: 90vw; height: 90vh; display: flex; justify-content: center; align-items: center; position: relative; box-shadow: none; border: none; }
#lightbox-image { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 50px rgba(0,0,0,0.5); border-radius: 4px; }
#lightbox-caption { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); color: white; background: rgba(0,0,0,0.5); padding: 8px 15px; border-radius: 8px; font-family: var(--heading-font); font-size: 1.5rem; }
#lightbox-close-btn { position: absolute; top: -10px; right: -10px; background: white !important; color: black !important; font-size: 1.5rem; z-index: 10; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.8) !important; color: black !important; font-size: 1.2rem; z-index: 10; }
#lightbox-prev-btn { left: 10px; }
#lightbox-next-btn { right: 10px; }

/* -------------------------------------------------------------------------- */
/* 11. TOAST NOTIFICATIONS
/* -------------------------------------------------------------------------- */

#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.toast { display: flex; align-items: center; gap: 15px; padding: 15px 20px; border-radius: 12px; background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--card-border-color); backdrop-filter: blur(10px); box-shadow: 0 5px 20px var(--shadow-color); transform: translateX(calc(100% + 20px)); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); min-width: 250px; max-width: 350px; }
.toast.show { transform: translateX(0); }
.toast i { font-size: 1.2rem; }
.toast-success i { color: var(--success-color); }
.toast-error i { color: var(--danger-color); }
.toast-info i { color: var(--primary-accent); }
.toast p { margin: 0; line-height: 1.4; font-weight: 500; color: var(--text-primary); }

/* --- MODIFIED: Styles for the First Meet Screen --- */
#first-meet-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #1e0c33, #3a1d4c);
    color: white;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
#first-meet-wrapper:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}
.star-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat;
}
#fm-stars-1 {
    background-image: radial-gradient(1px 1px at 20% 25%, white, transparent), radial-gradient(1px 1px at 80% 15%, white, transparent), radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 600px 600px;
    animation: fm-stars-pan 120s linear infinite;
}
#fm-stars-2 {
    background-image: radial-gradient(1.5px 1.5px at 10% 85%, #E5E7EB, transparent), radial-gradient(1.5px 1.5px at 60% 70%, #E5E7EB, transparent);
    background-size: 1000px 1000px;
    animation: fm-stars-pan 90s linear infinite reverse;
}
#fm-stars-3 {
    background-image: radial-gradient(2.5px 2.5px at 70% 90%, #9CA3AF, transparent), radial-gradient(3px 3px at 30% 10%, white, transparent);
    background-size: 1600px 1600px;
    animation: fm-stars-pan 60s linear infinite;
}

.first-meet-content {
    position: relative;
    z-index: 1;
    padding: 20px;
}
.fm-title {
    font-family: var(--heading-font);
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}
.fm-subtitle {
    font-family: var(--journal-font);
    font-size: 1.3rem;
    font-style: italic;
    color: #E5E7EB;
    max-width: 500px;
    margin: 10px auto 40px;
}
.animate-pop-in {
    /* MODIFIED: Removed initial opacity: 0 to ensure visibility */
    animation: pop-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#first-meet-form {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    max-width: 400px;
    margin: 0 auto;
}
#first-meet-form label {
    display: block;
    font-weight: 500;
    color: #D1D5DB;
    margin-bottom: 8px;
    text-align: left;
}
#first-meet-form input {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.2);
    color: white;
}
#first-meet-form input:focus {
    background: rgba(0,0,0,0.3);
    border-color: var(--primary-accent);
}
#first-meet-form button {
    width: 100%;
    margin-top: 10px;
    background-image: var(--primary-gradient);
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* -------------------------------------------------------------------------- */
/* 12. MOBILE & RESPONSIVE STYLES
/* -------------------------------------------------------------------------- */

/* --- Desktop-specific styles for Journal --- */
@media (min-width: 769px) {
    .journal-nav {
        justify-content: space-between;
        padding: 0 40px;
    }

    .journal-bookmark {
        /* On desktop, the bookmark is a ribbon, not a button */
        position: absolute;
        top: 0;
        left: auto;
        right: 15%; /* Positioned over the right page */
        transform: none; /* Reset mobile transforms */
        width: 50px;
        height: 90px;
        border-radius: 0 !important;
        background: var(--primary-accent) !important;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
        padding-top: 10px !important;
        font-size: 1.2rem;
    }

    .journal-bookmark:hover {
        height: 95px;
        background: #f472b6 !important;
        transform: none; /* Reset mobile transforms */
    }
}


@media (max-width: 768px) {
    .feature-nav { display: none; }
    .hamburger-btn { display: flex; }
    .couple-register-grid { grid-template-columns: 1fr; }
    .dream-board-columns { grid-template-columns: 1fr; }
    .gallery-container { column-count: 2; }
    #welcome-message { font-size: 3rem; }
    .time-block { width: 140px; height: 140px; }
    .time-block span { font-size: 3rem; }
    #timeline-widget::before { left: 15px; }
    .timeline-item, .timeline-item-right { width: 100%; left: 0; padding-left: 60px; padding-right: 10px; margin-bottom: 20px; }
    .timeline-item-left .timeline-content, .timeline-item-right .timeline-content { text-align: left; }
    .timeline-dot { left: 5px; }
    .timeline-item::after { left: 40px; }
    .timeline-item-left::after, .timeline-item-right::after { left: 40px; }
    .timeline-item-left .timeline-dot, .timeline-item-right .timeline-dot { left: 5px; }
    
    .book {
        flex-direction: column;
    }
    #journal-modal-content {
        width: 95vw;
        height: 85vh;
    }
    .book-page {
        border-radius: 10px !important;
        box-shadow: none !important;
        padding: 20px;
    }
    .book.single-page-view #journal-right-page {
        display: none;
    }
    .timeline-item-left::after, .timeline-item-right::after {
        left: 27px; /* Position between dot (at 5px) and content (at 60px) */
        width: 33px; /* The gap between the dot and the content padding */
        right: auto;
    }
}

@media (max-width: 480px) {
    .gallery-container { column-count: 1; }
    #welcome-message { font-size: 2.5rem; }
    .counts-display-grid { grid-template-columns: 1fr 1fr; }
}
