/* ==========================================
   MONTHVERSARY 4TH MONTH - DESIGN SYSTEM
   Aesthetic Romantic Light Theme & Theme Switcher
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,800;1,400&display=swap');

:root {
    /* DEFAULT THEME: WARM ROMANTIC LIGHT MODE */
    --bg-main: linear-gradient(135deg, #fff5f7 0%, #fde2e4 40%, #ffcad4 100%);
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(247, 37, 133, 0.15);
    --border-glow: rgba(247, 37, 133, 0.35);
    
    --primary-pink: #f72585;
    --rose-gold: #c97a63;
    --soft-pink: #ff758f;
    --gold-glow: #e09f3e;
    --accent-purple: #7209b7;
    --text-main: #2b1728;
    --text-muted: #6e4e69;
    --font-heading: 'Playfair Display', 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    --glass-shadow: 0 12px 35px rgba(247, 37, 133, 0.09);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* DARK THEME OVERRIDE */
body.dark-theme {
    --bg-main: #0d0a1a;
    --bg-card: rgba(255, 255, 255, 0.07);
    --bg-card-hover: rgba(255, 255, 255, 0.14);
    --border-glass: rgba(255, 255, 255, 0.18);
    --border-glow: rgba(247, 37, 133, 0.4);
    --rose-gold: #e2a97e;
    --text-main: #ffffff;
    --text-muted: #d0c7e2;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 4px;
}

/* Ambient Canvas Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Glassmorphism Card Utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}
.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(247, 37, 133, 0.3);
    transform: translateY(-4px);
}

/* ==========================================
   FLOATING TOP CONTROLS BAR (Theme & Audio)
   ========================================== */
.top-controls-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}
.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    color: var(--primary-pink);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.control-btn:hover {
    transform: scale(1.1);
    background: var(--primary-pink);
    color: #fff;
}

/* Floating Audio Player Bar */
.audio-player-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.music-disc {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--soft-pink), var(--primary-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}
.music-disc.playing {
    animation: spinDisc 3s linear infinite;
    box-shadow: 0 0 15px var(--primary-pink);
}
.audio-info {
    display: flex;
    flex-direction: column;
}
.audio-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-pink);
}
.audio-status {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================
   CONTAINER & SECTION LAYOUTS
   ========================================== */
.main-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
section {
    padding: 5rem 0;
    position: relative;
}
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid rgba(247, 37, 133, 0.25);
    border-radius: 30px;
    color: var(--primary-pink);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--text-main), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ==========================================
   HERO SECTION & LIVE TIMER
   ========================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 2rem;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: rgba(247, 37, 133, 0.1);
    border: 1px solid var(--soft-pink);
    border-radius: 50px;
    color: var(--primary-pink);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}
.hero-heading {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary-pink) 70%, var(--rose-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 3rem;
}

/* Live Timer Grid */
.timer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    width: 100%;
    max-width: 650px;
    margin-bottom: 3rem;
}
.timer-box {
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
}
.timer-val {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-pink);
    display: block;
    line-height: 1;
}
.timer-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ==========================================
   FITUR BARU 1: DAILY LOVE NOTE GENERATOR
   ========================================== */
.daily-note-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
}
.love-note-heart-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink), var(--soft-pink));
    color: #fff;
    font-size: 2.2rem;
    border: none;
    cursor: pointer;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.35);
    transition: var(--transition);
    animation: heartbeat 2s infinite;
}
.love-note-heart-btn:hover {
    transform: scale(1.15) rotate(10deg);
}
.note-display-box {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(247, 37, 133, 0.06);
    border-radius: 16px;
    border: 1px dashed var(--soft-pink);
}
.note-display-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-main);
    transition: opacity 0.4s ease;
}

/* ==========================================
   FITUR BARU 2: LOVE BUCKET LIST CHECKLIST
   ========================================== */
.bucket-list-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
}
.bucket-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(247, 37, 133, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.bucket-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--soft-pink), var(--primary-pink));
    width: 0%;
    transition: width 0.5s ease;
}
.bucket-items-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.bucket-item {
    padding: 1.1rem 1.4rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
body.dark-theme .bucket-item {
    background: rgba(255, 255, 255, 0.04);
}
.bucket-item:hover {
    background: rgba(247, 37, 133, 0.08);
    transform: translateX(6px);
}
.bucket-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--primary-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
}
.bucket-item.completed .bucket-checkbox {
    background: var(--primary-pink);
}
.bucket-item.completed .bucket-text {
    text-decoration: line-through;
    opacity: 0.6;
}
.bucket-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

/* ==========================================
   CONSTELLATION & POLAROID STYLING
   ========================================== */
.constellation-wrapper {
    position: relative;
    width: 100%;
    min-height: 480px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    overflow: hidden;
}
body.dark-theme .constellation-wrapper {
    background: rgba(13, 10, 26, 0.6);
}
.stars-container {
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.star-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}
.star-glow-point {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 10%, var(--primary-pink) 60%, transparent 90%);
    box-shadow: 0 0 25px var(--soft-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    transition: var(--transition);
    animation: starPulse 2.5s infinite ease-in-out;
}
.star-node:hover .star-glow-point {
    transform: scale(1.25) rotate(15deg);
    box-shadow: 0 0 40px var(--primary-pink);
}
.star-label {
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--bg-card);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    width: 90%;
    max-width: 550px;
    padding: 2rem;
    position: relative;
    border-radius: 24px;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.2rem;
}
.modal-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(247, 37, 133, 0.15);
    border-radius: 12px;
    color: var(--primary-pink);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
}
.modal-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Polaroid Grid */
.scrapbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    perspective: 1000px;
}
.polaroid-card {
    width: 100%;
    height: 380px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}
.polaroid-card.flipped {
    transform: rotateY(180deg);
}
.polaroid-front, .polaroid-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 1.2rem;
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
}
.polaroid-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.polaroid-caption {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #2b2b2b;
    font-weight: 700;
}
.polaroid-sub {
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.polaroid-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #fffcf5, #f8ede3);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Quiz Section */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
}
.quiz-progress {
    width: 100%;
    height: 8px;
    background: rgba(247, 37, 133, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.quiz-progress-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--soft-pink), var(--primary-pink));
    transition: width 0.4s ease;
}
.quiz-question-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0.8rem 0 2rem 0;
    color: var(--text-main);
}
.option-btn {
    width: 100%;
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-main);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
body.dark-theme .option-btn {
    background: rgba(255, 255, 255, 0.05);
}
.option-btn:hover {
    background: rgba(247, 37, 133, 0.1);
    border-color: var(--primary-pink);
    transform: translateX(6px);
}
.option-btn.correct { background: rgba(46, 204, 113, 0.2); border-color: #2ecc71; color: #27ae60; }
.option-btn.wrong { background: rgba(231, 76, 60, 0.2); border-color: #e74c3c; color: #c0392b; }

/* Envelope & Scratch Card */
.envelope-wrapper {
    width: 320px;
    height: 220px;
    position: relative;
    cursor: pointer;
    perspective: 800px;
}
.envelope {
    width: 100%;
    height: 100%;
    background: #e63946;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-top: 120px solid #d62828;
    transform-origin: top;
    transition: transform 0.6s ease;
    z-index: 4;
}
.envelope.open .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.envelope-heart-seal { position: absolute; z-index: 5; font-size: 2.2rem; }
.envelope.open .envelope-heart-seal { opacity: 0; }
.letter-content-box {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    line-height: 1.8;
}
.scratch-card-wrapper { max-width: 480px; margin: 2.5rem auto 0 auto; text-align: center; }
.scratch-container {
    position: relative;
    width: 100%;
    min-height: 150px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 2px solid var(--primary-pink);
    background: linear-gradient(135deg, #fff0f3, #ffe5ec);
    display: flex;
    justify-content: center;
    align-items: center;
}
body.dark-theme .scratch-container {
    background: linear-gradient(135deg, #2b1b36, #12091c);
}
.scratch-secret {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    color: var(--primary-pink);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
#scratch-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; z-index: 10; }
.reveal-scratch-btn {
    margin-top: 1rem;
    padding: 8px 20px;
    background: rgba(247, 37, 133, 0.1);
    border: 1px solid var(--primary-pink);
    border-radius: 20px;
    color: var(--primary-pink);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.reveal-scratch-btn:hover { background: var(--primary-pink); color: #fff; }

/* Promises Dashboard */
.promises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-bottom: 4rem;
}
.promise-card {
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
}
.promise-icon {
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid var(--border-glass);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-pink);
    font-size: 1.6rem;
}

.final-love-banner {
    text-align: center;
    padding: 4rem 2rem;
}
.final-love-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-pink), var(--rose-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Keyframe Animations */
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spinDisc { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes starPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.15); opacity: 1; } }

/* Passcode Overlay */
.passcode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 245, 247, 0.96);
    backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
body.dark-theme .passcode-overlay {
    background: rgba(13, 10, 26, 0.96);
}
.passcode-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.passcode-box { width: 90%; max-width: 400px; padding: 2.5rem; text-align: center; }
.passcode-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--primary-pink); }
.passcode-title { font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary-pink); margin-bottom: 0.5rem; }
.pin-input-group { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 1.5rem; }
.pin-digit {
    width: 50px; height: 60px; font-size: 1.5rem; font-weight: 700; text-align: center;
    background: rgba(247, 37, 133, 0.08); border: 2px solid var(--border-glass); border-radius: 12px;
    color: var(--text-main); outline: none; transition: var(--transition);
}
.pin-digit:focus { border-color: var(--primary-pink); box-shadow: 0 0 15px rgba(247, 37, 133, 0.3); }
.passcode-btn {
    width: 100%; padding: 0.9rem; border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-pink), var(--soft-pink));
    color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.passcode-error { color: #ff4d6d; font-size: 0.85rem; margin-top: 0.8rem; display: none; }

@media (max-width: 768px) {
    .hero-heading { font-size: 2.6rem; }
    .timer-container { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .timer-val { font-size: 2.2rem; }
    .section-title { font-size: 2rem; }
    .stars-container { min-height: 500px; flex-direction: column; }
    .letter-content-box { padding: 1.8rem; }
}
