/* ==========================================================================
   CHÚC MỪNG 20/10 - DÀNH TẶNG BÉ THỎ
   Aesthetic Romantic & Cute Glassmorphic Styling (Fully Mobile Optimized)
   ========================================================================== */

:root {
    --primary-pink: #ff6584;
    --primary-rose: #ff477e;
    --soft-pink: #ffe5ec;
    --pastel-pink: #fbb1bd;
    --accent-gold: #ffd166;
    --accent-purple: #b5838d;
    --text-dark: #4a2c3a;
    --text-muted: #7d5a68;
    --bg-gradient: linear-gradient(135deg, #ffd3da 0%, #ffe8ed 30%, #fbe4e8 60%, #ffd0dc 100%);
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.88);
    --glass-shadow: 0 10px 30px rgba(255, 105, 135, 0.14), 0 3px 10px rgba(0, 0, 0, 0.03);
    --card-radius: 22px;
    --font-heading: 'Playfair Display', serif;
    --font-handwriting: 'Dancing Script', cursive;
    --font-body: 'Nunito', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-gradient);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    position: relative;
    line-height: 1.6;
    touch-action: manipulation;
}

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

/* Floating Ambient Emojis */
.floating-bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-item {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0.32;
    filter: drop-shadow(0 3px 6px rgba(255, 105, 135, 0.25));
    animation: floatAmbient 12s infinite ease-in-out;
}

.f1 { top: 8%; left: 6%; animation-delay: 0s; font-size: 2rem; }
.f2 { top: 22%; right: 6%; animation-delay: 2s; font-size: 2.2rem; }
.f3 { top: 48%; left: 4%; animation-delay: 4s; }
.f4 { top: 68%; right: 6%; animation-delay: 1s; font-size: 1.8rem; }
.f5 { top: 88%; left: 8%; animation-delay: 3s; }
.f6 { top: 35%; left: 50%; animation-delay: 5s; opacity: 0.18; }
.f7 { top: 12%; right: 30%; animation-delay: 2.5s; }
.f8 { top: 82%; left: 78%; animation-delay: 4.5s; font-size: 2rem; }

@keyframes floatAmbient {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-20px) rotate(12deg) scale(1.08);
    }
}

/* Music Toggle Floating Button */
.music-controller {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    z-index: 100;
}

.music-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid #ffccd5;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-rose);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 71, 126, 0.22);
    transition: all 0.25s ease;
}

.music-btn:active {
    transform: scale(0.94);
}

.music-btn.playing {
    background: linear-gradient(135deg, #ff477e, #ff758c);
    color: #fff;
    border-color: #ff477e;
    animation: pulseMusic 1.8s infinite ease-in-out;
}

@keyframes pulseMusic {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(255, 71, 126, 0.35); }
    50% { transform: scale(1.04); box-shadow: 0 6px 20px rgba(255, 71, 126, 0.5); }
}

/* Main Container */
.main-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: max(20px, env(safe-area-inset-top)) 16px max(60px, env(safe-area-inset-bottom));
}

/* Glassmorphism Card Style */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 28px 22px;
    margin-bottom: 28px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================================================================
   INTRO MODAL: SURPRISE GIFT BOX
   ========================================================================== */
.intro-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    text-align: center;
    padding: 10px 10px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.intro-modal.fade-out {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

.gift-box-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 360px;
}

.sparkle-aura {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 143, 171, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: pulseAura 3s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulseAura {
    0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

.gift-bunny-peek, .gift-flower-peek {
    font-size: 3.2rem;
    margin-bottom: -12px;
    z-index: 1;
    animation: bunnyBounce 2s infinite ease-in-out;
    user-select: none;
}

.elegant-badge-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.crown-icon {
    font-size: 3.2rem;
    filter: drop-shadow(0 4px 12px rgba(255, 209, 102, 0.65));
    animation: crownFloat 2.5s infinite ease-in-out;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.08); }
}

.queen-badge {
    margin-top: 6px;
    background: linear-gradient(135deg, #fff5f7, #ffffff);
    border: 1.5px solid #ffccd5;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-rose);
    box-shadow: 0 4px 14px rgba(255, 71, 126, 0.16);
    letter-spacing: 0.5px;
}

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

/* 3D-Look Gift Box */
.gift-box {
    width: 155px;
    height: 140px;
    position: relative;
    cursor: pointer;
    transition: transform 0.25s ease;
    filter: drop-shadow(0 12px 22px rgba(255, 71, 126, 0.3));
    user-select: none;
}

.gift-box:active {
    transform: scale(0.96);
}

.gift-lid {
    width: 175px;
    height: 40px;
    background: linear-gradient(135deg, #ff477e, #ff6584);
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: -10px;
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ribbon-bow {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 28px;
}

.bow-left, .bow-right {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 4px solid #ffd166;
    border-radius: 50% 50% 0 50%;
    background: #ffea79;
}

.bow-left {
    left: 2px;
    transform: rotate(35deg);
}

.bow-right {
    right: 2px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-35deg);
}

.bow-center {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #ffd166;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.gift-body {
    width: 155px;
    height: 105px;
    background: linear-gradient(135deg, #ff5c8a, #ff758f);
    border-radius: 0 0 16px 16px;
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ribbon-vertical {
    position: absolute;
    width: 24px;
    height: 100%;
    background: linear-gradient(to right, #ffd166, #ffea79, #ffd166);
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.5);
}

.gift-tag {
    position: relative;
    z-index: 2;
    background: #fff;
    color: var(--primary-rose);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border: 1.5px dashed #ff99b0;
}

.gift-hint {
    margin-top: 24px;
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.5;
    padding: 0 10px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 13px 30px;
    font-size: 1.08rem;
    font-weight: 800;
    font-family: var(--font-body);
    color: #fff;
    background: linear-gradient(135deg, #ff477e 0%, #ff6584 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 71, 126, 0.38);
    transition: all 0.25s ease;
    width: auto;
    max-width: 280px;
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(255, 71, 126, 0.4);
}

.pulse-btn {
    animation: heartbeat 2s infinite ease-in-out;
}

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

.hidden {
    display: none !important;
}

/* ==========================================================================
   MAIN GREETING CONTENT
   ========================================================================== */
.greeting-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO SECTION */
.hero-section {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 6px;
}

/* Handcrafted CSS Bunny Mascot */
.bunny-mascot {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.bunny-head {
    width: 100px;
    height: 88px;
    background: #ffffff;
    border-radius: 50% 50% 45% 45%;
    position: relative;
    box-shadow: 0 6px 18px rgba(255, 143, 171, 0.32);
    border: 3px solid #ffe5ec;
}

.bunny-ear {
    width: 24px;
    height: 64px;
    background: #ffffff;
    border-radius: 50% 50% 20% 20%;
    position: absolute;
    top: -46px;
    border: 3px solid #ffe5ec;
    box-shadow: inset 0 -4px 0 #fff;
    transform-origin: bottom center;
}

.bunny-ear::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 3px;
    width: 12px;
    height: 38px;
    background: #ffb3c6;
    border-radius: 50%;
}

.ear-left {
    left: 12px;
    transform: rotate(-10deg);
    animation: earWiggleLeft 3.5s infinite ease-in-out;
}

.ear-right {
    right: 12px;
    transform: rotate(10deg);
    animation: earWiggleRight 3.5s infinite ease-in-out;
}

@keyframes earWiggleLeft {
    0%, 80%, 100% { transform: rotate(-10deg); }
    85% { transform: rotate(-22deg); }
    90% { transform: rotate(-8deg); }
    95% { transform: rotate(-18deg); }
}

@keyframes earWiggleRight {
    0%, 80%, 100% { transform: rotate(10deg); }
    85% { transform: rotate(22deg); }
    90% { transform: rotate(8deg); }
    95% { transform: rotate(18deg); }
}

.bunny-eye {
    width: 9px;
    height: 11px;
    background: #4a2c3a;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    animation: blinkEye 4s infinite;
}

.bunny-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3.5px;
    height: 3.5px;
    background: #fff;
    border-radius: 50%;
}

.eye-left { left: 24px; }
.eye-right { right: 24px; }

@keyframes blinkEye {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

.bunny-nose {
    width: 8px;
    height: 6px;
    background: #ff758f;
    border-radius: 50% 50% 60% 60%;
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
}

.bunny-cheeks {
    width: 15px;
    height: 9px;
    background: rgba(255, 117, 143, 0.45);
    border-radius: 50%;
    position: absolute;
    top: 45px;
}

.cheek-left { left: 13px; }
.cheek-right { right: 13px; }

.bunny-mouth {
    width: 13px;
    height: 7px;
    border-bottom: 2px solid #ff758f;
    border-radius: 0 0 50% 50%;
    position: absolute;
    top: 51px;
    left: 50%;
    transform: translateX(-50%);
}

.bunny-flower {
    position: absolute;
    top: -14px;
    right: 10px;
    font-size: 1.4rem;
    animation: flowerSpin 6s infinite ease-in-out;
}

@keyframes flowerSpin {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.15); }
}

.bunny-badge {
    margin-top: 12px;
    background: linear-gradient(135deg, #ffe5ec, #fff);
    border: 1.5px solid #ffccd5;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-rose);
    box-shadow: 0 3px 10px rgba(255, 71, 126, 0.12);
}

.date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 71, 126, 0.2);
    padding: 5px 16px;
    border-radius: 25px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--primary-rose);
    margin-bottom: 12px;
}

.main-title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 5.5vw, 2.8rem);
    line-height: 1.22;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.highlight-name {
    font-family: var(--font-handwriting);
    font-size: clamp(2.4rem, 8vw, 3.8rem);
    color: var(--primary-rose);
    display: inline-block;
    background: linear-gradient(135deg, #ff477e, #ff8fa3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(255, 71, 126, 0.2));
}

.hero-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ==========================================================================
   LOVE LETTER SECTION
   ========================================================================== */
.letter-section {
    position: relative;
    border-left: 5px solid #ff6584;
}

.wax-seal {
    position: absolute;
    top: -16px;
    right: 16px;
    font-size: 2rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
}

.letter-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    border-bottom: 1.5px dashed #fcd5ce;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.letter-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    color: var(--primary-rose);
}

.letter-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.letter-body {
    min-height: 120px;
    font-size: clamp(0.98rem, 3.2vw, 1.12rem);
    line-height: 1.8;
    color: #442a36;
}

.typewriter-content {
    white-space: pre-wrap;
    display: inline;
    word-break: break-word;
}

.typing-cursor {
    font-weight: bold;
    color: var(--primary-rose);
    animation: blinkCursor 0.8s infinite;
}

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

.letter-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 182, 193, 0.4);
    gap: 12px;
}

.btn-outline-small {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid #ff99b0;
    color: var(--primary-rose);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-small:active {
    background: #ffe5ec;
    transform: scale(0.95);
}

.signature {
    text-align: right;
    font-family: var(--font-handwriting);
}

.signature span {
    display: block;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.signature-name {
    font-size: 1.5rem !important;
    font-weight: bold;
    color: var(--primary-rose) !important;
}

/* ==========================================================================
   COMPLIMENT GENERATOR
   ========================================================================== */
.compliment-section {
    text-align: center;
}

.section-title-wrap {
    margin-bottom: 18px;
}

.section-title-wrap h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 4.2vw, 1.75rem);
    color: var(--text-dark);
    margin-bottom: 5px;
}

.section-title-wrap p {
    color: var(--text-muted);
    font-size: clamp(0.88rem, 3vw, 1rem);
    padding: 0 8px;
}

.compliment-box {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 18px;
    border: 2px dashed #ffb3c6;
    box-shadow: inset 0 2px 6px rgba(255, 105, 135, 0.06);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compliment-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.1rem, 3.6vw, 1.3rem);
    color: #c9184a;
    line-height: 1.5;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SPECIAL GIFT TICKETS / 3D FLIP CARDS
   ========================================================================== */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-top: 22px;
    margin-bottom: 35px;
}

.flip-card {
    background-color: transparent;
    height: 235px;
    perspective: 1000px;
    cursor: pointer;
    touch-action: manipulation;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(255, 105, 135, 0.14);
}

/* Flip on tap or hover */
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.flip-card-front .card-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.08));
}

.flip-card-front h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #4a2c3a;
}

.click-hint {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.5);
    padding: 3px 10px;
    border-radius: 12px;
}

.flip-card-back {
    transform: rotateY(180deg);
    text-align: center;
    line-height: 1.5;
}

.flip-card-back h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.flip-card-back p {
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.stamp {
    display: inline-block;
    padding: 3px 10px;
    border: 1.5px dashed currentColor;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Card Theme Palettes */
.card-pink { background: linear-gradient(135deg, #ffe5ec, #ffc2d1); color: #590d22; }
.card-pink-back { background: #590d22; color: #ffe5ec; }

.card-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #4c1d95; }
.card-purple-back { background: #4c1d95; color: #f3e8ff; }

.card-orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #7c2d12; }
.card-orange-back { background: #7c2d12; color: #ffedd5; }

.card-yellow { background: linear-gradient(135deg, #fef9c3, #fde047); color: #713f12; }
.card-yellow-back { background: #713f12; color: #fef9c3; }

.card-teal { background: linear-gradient(135deg, #ccfbf1, #99f6e4); color: #134e4a; }
.card-teal-back { background: #134e4a; color: #ccfbf1; }

.card-rose { background: linear-gradient(135deg, #ffe4e6, #fecdd3); color: #881337; }
.card-rose-back { background: #881337; color: #ffe4e6; }

/* ==========================================================================
   POLAROID GALLERY
   ========================================================================== */
.polaroid-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin-top: 24px;
}

.polaroid-card {
    background: #ffffff;
    padding: 14px 14px 18px;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    max-width: 240px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.polaroid-card:hover {
    transform: scale(1.03) rotate(0deg) !important;
    box-shadow: 0 14px 30px rgba(255, 71, 126, 0.22);
    z-index: 5;
}

.rotate-slight { transform: rotate(2.5deg); }
.rotate-neg { transform: rotate(-2.5deg); }

.polaroid-pin {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
}

.polaroid-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 6px;
    background: #fdf2f4;
    cursor: pointer;
}

.polaroid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
    transition: transform 0.35s ease;
}

.photo-overlay-edit {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 0;
    text-align: center;
    opacity: 0.85; /* Always slightly visible on mobile so user knows they can tap */
    transition: opacity 0.2s ease;
}

.polaroid-caption {
    font-family: var(--font-handwriting);
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a2c3a;
    text-align: center;
    margin-top: 10px;
}

.hidden-input {
    display: none;
}

/* ==========================================================================
   LOVE METER SECTION
   ========================================================================== */
.love-meter-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 4.2vw, 1.75rem);
    color: var(--primary-rose);
    margin-bottom: 5px;
}

.counter-display {
    margin: 16px 0;
}

#heartCount {
    font-size: clamp(2.8rem, 8vw, 3.5rem);
    font-weight: 800;
    color: #ff477e;
    font-family: var(--font-heading);
    letter-spacing: -1px;
    display: block;
}

.counter-display .unit {
    display: block;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.interactive-heart-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.big-heart-btn {
    width: 74px;
    height: 74px;
    background: linear-gradient(135deg, #ff477e, #ff758f);
    border: none;
    border-radius: 50%;
    font-size: 2.3rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 71, 126, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    touch-action: manipulation;
}

.big-heart-btn:active {
    transform: scale(0.85);
}

.tap-guide {
    font-size: 0.9rem;
    color: var(--primary-rose);
    font-weight: 700;
}

/* Floating Click Hearts */
.floating-click-heart {
    position: fixed;
    pointer-events: none;
    font-size: 1.8rem;
    z-index: 999;
    animation: flyUpHeart 1.1s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes flyUpHeart {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - 120px)) scale(1.5) rotate(var(--rot, 20deg));
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-section {
    text-align: center;
    padding-top: 24px;
}

.final-wish {
    font-family: var(--font-handwriting);
    font-size: clamp(1.35rem, 4.5vw, 1.8rem);
    color: #a4133c;
    max-width: 600px;
    margin: 0 auto 14px;
    line-height: 1.4;
    padding: 0 10px;
}

.footer-bunnies {
    font-size: 1.6rem;
    margin-bottom: 10px;
    letter-spacing: 6px;
}

.copyright {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MOBILE MEDIA QUERIES & OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 600px) {
    .main-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }

    .card-glass {
        padding: 22px 16px;
        border-radius: 18px;
        margin-bottom: 22px;
    }

    .music-btn {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .music-btn .music-text {
        display: none; /* Icon only on small screens for clean interface */
    }

    .music-btn .music-icon {
        font-size: 1.15rem;
    }

    .gift-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .flip-card {
        height: 220px;
    }

    .polaroid-gallery {
        gap: 18px;
    }

    .polaroid-card {
        max-width: 220px;
    }

    .letter-footer {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        text-align: center;
    }

    .signature {
        text-align: center;
    }

    .float-item {
        font-size: 1.4rem;
    }
}
