/* ==========================================================================
   ZALU'S CHEER-UP SANCTUARY — DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-primary: #fff7f9;
    --bg-gradient: linear-gradient(135deg, #fff5f7 0%, #ffeef2 50%, #fff8fb 100%);
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(255, 182, 193, 0.45);
    --card-shadow: 0 12px 36px rgba(255, 143, 171, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    
    --primary: #ff4d79;
    --primary-hover: #e63462;
    --primary-light: #ffe5ec;
    --accent-peach: #ff9a8b;
    --accent-yellow: #ffd166;
    --accent-mint: #06d6a0;
    --accent-purple: #9d4edd;
    
    --text-dark: #2d232e;
    --text-muted: #6f5d6e;
    --text-pink: #d81e5b;
    
    /* Fonts */
    --font-heading: 'Fredoka', cursive, sans-serif;
    --font-ui: 'Outfit', -apple-system, sans-serif;
    --font-hand: 'Caveat', cursive;
    --font-body: 'Poppins', -apple-system, sans-serif;
    
    /* Transitions & Radii */
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Canvases */
#ambient-canvas, #confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#ambient-canvas {
    z-index: 0;
    opacity: 0.7;
}

#confetti-canvas {
    z-index: 99999;
}

/* Page Container */
.page-container {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 80px 20px 60px;
}

/* ==========================================================================
   TOP STICKY FLOATING NAV BAR
   ========================================================================== */
.top-nav-bar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 820px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 182, 193, 0.5);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(255, 107, 129, 0.15);
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-status-dot {
    width: 10px;
    height: 10px;
    background: #ff4d79;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #ff4d79;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.nav-tagline {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-pink);
    letter-spacing: 0.2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-btn {
    background: var(--primary-light);
    border: 1px solid rgba(255, 107, 129, 0.3);
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.nav-icon-btn:hover {
    background: #ffd3df;
    transform: translateY(-1px);
}

.nav-icon-btn:active {
    transform: scale(0.96);
}

/* ==========================================================================
   SECTION 1: HERO & EMERGENCY CHEER-UP BUTTON
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 40px 10px 30px;
}

.alert-pill-wrapper {
    display: inline-block;
    margin-bottom: 20px;
}

.alert-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff0f3;
    border: 1.5px dashed #ff4d79;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    color: #d81e5b;
    animation: gentleWiggle 3s ease-in-out infinite;
}

@keyframes gentleWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-1.5deg); }
    75% { transform: rotate(1.5deg); }
}

.hero-main-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #2b1e2c;
}

.gradient-name {
    background: linear-gradient(135deg, #ff4d79 0%, #ff8da1 50%, #f72585 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 8px 24px rgba(255, 77, 121, 0.25);
    display: inline-block;
}

.hero-desc {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px;
    font-weight: 400;
}

/* The Big Emergency Button Card */
.emergency-action-card {
    background: var(--card-bg);
    border: 2px solid rgba(255, 143, 171, 0.4);
    border-radius: var(--radius-lg);
    padding: 34px 24px;
    box-shadow: var(--card-shadow), 0 0 30px rgba(255, 77, 121, 0.1);
    position: relative;
    max-width: 580px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.emergency-badge {
    position: absolute;
    top: 14px;
    right: -32px;
    background: #ff4d79;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 36px;
    transform: rotate(25deg);
    box-shadow: 0 2px 8px rgba(255, 77, 121, 0.4);
}

.emergency-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: #2d232e;
    margin-bottom: 6px;
}

.emergency-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.emergency-button {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, #ff2e63 0%, #ff5277 50%, #f92f60 100%);
    border: none;
    border-radius: var(--radius-full);
    padding: 18px 24px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(255, 46, 99, 0.42), 0 0 0 6px rgba(255, 77, 121, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0 auto;
    transition: var(--transition-fast);
    animation: btnRadiate 2.4s infinite;
}

@keyframes btnRadiate {
    0% { box-shadow: 0 10px 28px rgba(255, 46, 99, 0.42), 0 0 0 0px rgba(255, 77, 121, 0.3); }
    70% { box-shadow: 0 10px 28px rgba(255, 46, 99, 0.42), 0 0 0 14px rgba(255, 77, 121, 0); }
    100% { box-shadow: 0 10px 28px rgba(255, 46, 99, 0.42), 0 0 0 0px rgba(255, 77, 121, 0); }
}

.emergency-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 36px rgba(255, 46, 99, 0.55), 0 0 0 8px rgba(255, 77, 121, 0.2);
}

.emergency-button:active {
    transform: translateY(2px) scale(0.97);
}

.btn-heart-pulse {
    font-size: 1.8rem;
    animation: heartBeat 1.2s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
}

.btn-core-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-sub-text {
    font-size: 0.8rem;
    opacity: 0.92;
    font-weight: 500;
}

.emergency-counter {
    margin-top: 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-pink);
}

/* ==========================================================================
   GLOBAL SECTION CARDS
   ========================================================================== */
.section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 38px 28px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: var(--transition-smooth);
}

.section-card:hover {
    box-shadow: 0 18px 45px rgba(255, 143, 171, 0.16);
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-subtitle {
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #ff4d79;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 6px;
    background: #ffe5ec;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.8vw, 2.2rem);
    color: #2b1e2c;
    margin-bottom: 8px;
}

.section-lead {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ==========================================================================
   SECTION 2: GRUMPY-O-METER & PRESCRIPTION
   ========================================================================== */
.mood-slider-container {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}

.mood-display-avatar {
    font-size: 4.5rem;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: avatarBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 6px 12px rgba(255, 77, 121, 0.25));
}

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

.mood-level-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

.mood-level-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 24px;
}

/* Slider Track */
.slider-track-wrap {
    margin-bottom: 30px;
}

#mood-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 14px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #ffd166 0%, #ff8da1 30%, #ff4d79 70%, #9d4edd 100%);
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#mood-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #ff4d79;
    box-shadow: 0 4px 12px rgba(255, 77, 121, 0.45);
    cursor: pointer;
    transition: var(--transition-fast);
}

#mood-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#mood-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #ff4d79;
    box-shadow: 0 4px 12px rgba(255, 77, 121, 0.45);
    cursor: pointer;
    transition: var(--transition-fast);
}

.slider-step-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Prescription Box */
.prescription-box {
    background: #fff;
    border: 2px solid #ffccd5;
    border-radius: var(--radius-md);
    padding: 22px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(255, 182, 193, 0.2);
    position: relative;
    overflow: hidden;
}

.rx-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1.5px dashed #ffccd5;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.rx-symbol {
    font-size: 2rem;
    font-weight: 900;
    color: #ff4d79;
    font-family: serif;
}

.rx-title {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #6f5d6e;
}

.rx-body {
    font-size: 1.02rem;
    color: #2b1e2c;
    line-height: 1.6;
    margin-bottom: 18px;
    min-height: 54px;
}

.rx-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid #fff0f3;
    padding-top: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #ff4d79;
}

.rx-btn {
    background: #ff4d79;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.rx-btn:hover {
    background: #e63462;
    transform: scale(1.05);
}

/* ==========================================================================
   SECTION 3: POP-THE-GRUMPY-CLOUDS MINI GAME
   ========================================================================== */
.game-dashboard {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #fff5f8;
    border: 1px solid #ffd3e0;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.game-stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.rank-value {
    font-size: 1.05rem;
    color: #9d4edd;
}

.game-mini-btn {
    background: white;
    border: 1px solid #ffccd5;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.game-mini-btn:hover {
    background: #ffe5ec;
}

.game-arena {
    position: relative;
    height: 360px;
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 60%, #fff0f5 100%);
    border: 2px solid #bfdbfe;
    border-radius: var(--radius-md);
    overflow: hidden;
    touch-action: manipulation;
}

.game-start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
}

.overlay-icon {
    font-size: 3rem;
    animation: avatarBounce 1.5s infinite;
}

.overlay-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #2b1e2c;
}

.primary-btn {
    background: linear-gradient(135deg, #ff4d79 0%, #ff758c 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 77, 121, 0.35);
    transition: var(--transition-fast);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(255, 77, 121, 0.45);
}

/* Floating Game Cloud Element */
.grumpy-cloud {
    position: absolute;
    cursor: pointer;
    user-select: none;
    font-size: 2.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.15s ease;
    animation: floatUp linear forwards;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.grumpy-cloud:hover {
    transform: scale(1.15);
}

.grumpy-cloud:active {
    transform: scale(0.85);
}

@keyframes floatUp {
    0% {
        transform: translateY(380px) scale(0.85);
        opacity: 0.2;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) scale(1.05);
        opacity: 0;
    }
}

/* Floating Popped Particles inside Arena */
.pop-sunshine {
    position: absolute;
    pointer-events: none;
    font-size: 2.2rem;
    animation: popDisperse 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes popDisperse {
    0% {
        transform: scale(0.5) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.35) translateY(-25px) rotate(20deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.8) translateY(-50px) rotate(45deg);
        opacity: 0;
    }
}

/* ==========================================================================
   SECTION 4: POLAROID MEMORY WALL (3D TILT & FLIP)
   ========================================================================== */
.tap-hint {
    color: #ff4d79;
    display: inline-block;
    margin-top: 4px;
}

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
    margin-top: 10px;
}

.polaroid-card {
    perspective: 1200px;
    height: 420px;
    cursor: pointer;
}

.polaroid-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.polaroid-card.flipped .polaroid-inner {
    transform: rotateY(180deg);
}

.polaroid-front, .polaroid-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0e6eb;
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
}

.polaroid-front {
    transform: rotate(0deg);
}

.polaroid-card:nth-child(even) .polaroid-front {
    transform: rotate(1.2deg);
}

.polaroid-card:nth-child(3n) .polaroid-front {
    transform: rotate(-1.5deg);
}

.polaroid-card:hover .polaroid-front {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 36px rgba(255, 77, 121, 0.2);
}

/* Washi Tape Stickers */
.tape-sticker {
    position: absolute;
    height: 22px;
    width: 80px;
    background: rgba(255, 214, 224, 0.75);
    border-left: 2px dashed rgba(255, 143, 171, 0.6);
    border-right: 2px dashed rgba(255, 143, 171, 0.6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    z-index: 5;
}

.tape-top-center {
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
}

.tape-top-left {
    top: -8px;
    left: 12px;
    transform: rotate(-8deg);
}

.tape-top-right {
    top: -8px;
    right: 12px;
    transform: rotate(7deg);
}

.tape-back {
    background: rgba(254, 240, 138, 0.7);
    border-left-color: rgba(234, 179, 8, 0.6);
    border-right-color: rgba(234, 179, 8, 0.6);
}

/* Image Wrapper */
.img-wrapper {
    width: 100%;
    height: 220px;
    background: #fff0f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.polaroid-card:hover .img-wrapper img {
    transform: scale(1.04);
}

.polaroid-caption {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #3d2f3d;
    text-align: center;
    margin: 12px 0 8px;
    flex-grow: 1;
}

/* Card Action Bar & Reaction Buttons */
.card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border-top: 1px solid #fceef3;
    padding-top: 8px;
}

.react-btn {
    background: #fff0f4;
    border: 1px solid #ffccd5;
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a3b4a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: var(--transition-fast);
}

.react-btn:hover {
    background: #ffe0e9;
    transform: scale(1.1);
}

.react-btn:active {
    transform: scale(0.9);
}

.flip-hint-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ff4d79;
    background: #ffe5ec;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

/* Polaroid Back Side (Secret Handwritten Note) */
.polaroid-back {
    transform: rotateY(180deg);
    background: #fffdf5;
    border: 1px solid #fef08a;
    justify-content: space-between;
    text-align: center;
    padding: 22px 18px 16px;
    overflow-y: auto;
}

.back-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #ff4d79;
    margin-bottom: 10px;
}

.handwritten-text {
    font-family: var(--font-hand);
    font-size: 1.26rem;
    font-weight: 700;
    color: #2b1e2c;
    line-height: 1.38;
    margin-bottom: 12px;
}

.back-sig {
    font-family: var(--font-hand);
    font-size: 1.25rem;
    color: #ff4d79;
    font-weight: 700;
}

.back-flip {
    margin-top: 16px;
    align-self: center;
}

/* Floating Emoji Reactions from Click */
.floating-reaction-emoji {
    position: fixed;
    pointer-events: none;
    font-size: 1.8rem;
    z-index: 999999;
    animation: floatEmoji 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes floatEmoji {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translateY(-90px) scale(1.4);
        opacity: 0;
    }
}

/* ==========================================================================
   SECTION 5: OFFICIAL POUT PERMIT & BOYFRIEND COURT
   ========================================================================== */
.parchment-document {
    position: relative;
    background: #fffef7;
    border: 2px solid #e2d9c2;
    border-radius: var(--radius-md);
    padding: 36px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), inset 0 0 40px rgba(217, 196, 147, 0.15);
    overflow: hidden;
}

.parchment-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: rgba(226, 217, 194, 0.25);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

.doc-header {
    text-align: center;
    border-bottom: 2px solid #e8dfcb;
    padding-bottom: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.doc-badge {
    font-family: var(--font-ui);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #8c734b;
    background: #f5eedb;
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.doc-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #433827;
}

.doc-content {
    font-size: 0.95rem;
    color: #4a3e2e;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.doc-clause {
    background: rgba(247, 243, 233, 0.6);
    border-left: 3px solid #d4af37;
    padding: 10px 14px;
    border-radius: 4px;
    margin: 12px 0;
}

/* Target Area for Stamp */
.doc-stamp-target {
    min-height: 120px;
    border: 2px dashed #d8c8a8;
    border-radius: var(--radius-md);
    margin: 22px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.stamp-placeholder-text {
    font-size: 0.88rem;
    font-style: italic;
    color: #a8997a;
    text-align: center;
    padding: 10px;
}

/* Applied Realistic Ink Stamp */
.applied-stamp {
    position: absolute;
    width: 220px;
    height: 90px;
    border: 4px solid #d90429;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #d90429;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(-8deg) scale(1);
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.3);
    background: rgba(255, 240, 243, 0.85);
    animation: slamStamp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes slamStamp {
    0% {
        transform: scale(2.5) rotate(-20deg);
        opacity: 0;
    }
    100% {
        transform: rotate(-8deg) scale(1);
        opacity: 1;
    }
}

.stamp-inner-text {
    font-size: 1.15rem;
    line-height: 1.2;
}

.stamp-date {
    font-size: 0.72rem;
    font-family: var(--font-ui);
    margin-top: 2px;
}

.doc-actions {
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.actions-prompt {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    color: #4a3e2e;
    margin-bottom: 12px;
}

.stamp-btn-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stamp-btn {
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 20px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stamp-forgive-btn {
    background: #06d6a0;
    color: white;
}

.stamp-forgive-btn:hover {
    background: #05be8d;
    transform: translateY(-2px);
}

.stamp-snack-btn {
    background: #ff9a8b;
    color: white;
}

.stamp-snack-btn:hover {
    background: #f78270;
    transform: translateY(-2px);
}

/* ==========================================================================
   SECTION 5B: THE HEAD BREAKER ARENA
   ========================================================================== */
.headbreaker-arena {
    background: linear-gradient(180deg, #fff8fa 0%, #fff0f5 100%);
    border: 2px solid #ffccd5;
    border-radius: var(--radius-lg);
    padding: 26px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(255, 77, 121, 0.05);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Broken Section State */
.headbreaker-arena.is-broken {
    border-color: #ff2e63 !important;
    border-width: 3px !important;
    border-style: dashed !important;
    background: linear-gradient(180deg, #fff0f3 0%, #ffe0e8 100%) !important;
    box-shadow: 0 0 32px rgba(255, 46, 99, 0.45), inset 0 0 35px rgba(255, 46, 99, 0.16) !important;
    animation: arenaEarthquake 0.6s ease;
}

@keyframes arenaEarthquake {
    0% { transform: translate(0, 0) rotate(0deg); }
    15% { transform: translate(-10px, 6px) rotate(-1.8deg); }
    30% { transform: translate(9px, -7px) rotate(1.4deg); }
    45% { transform: translate(-7px, -5px) rotate(-1deg); }
    60% { transform: translate(6px, 5px) rotate(0.8deg); }
    75% { transform: translate(-4px, 3px) rotate(-0.4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.headbreaker-arena.is-healing-mended {
    animation: mendGoldenGlow 1.2s ease forwards;
}

@keyframes mendGoldenGlow {
    0% {
        box-shadow: 0 0 45px rgba(6, 214, 160, 0.8), inset 0 0 30px rgba(6, 214, 160, 0.4);
        border-color: #06d6a0;
    }
    100% {
        box-shadow: inset 0 2px 8px rgba(255, 77, 121, 0.05);
        border-color: #ffccd5;
    }
}

/* Broken Section Fracture & Jagged Split Overlay */
.section-fracture-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
    animation: fractureFlashIn 0.4s ease-out;
}

@keyframes fractureFlashIn {
    0% { opacity: 0; }
    50% { opacity: 1; background: rgba(255, 46, 99, 0.16); }
    100% { opacity: 1; background: transparent; }
}

.fracture-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crack-path {
    fill: none;
    stroke: #ff2e63;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(255, 46, 99, 0.9));
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawCrack 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.crack-path.main-crack {
    stroke-width: 5;
    stroke: #e11d48;
}

.crack-path.branch-1, .crack-path.branch-2 { animation-delay: 0.08s; }
.crack-path.branch-3, .crack-path.branch-4 { animation-delay: 0.16s; }
.crack-path.branch-5, .crack-path.branch-6 { animation-delay: 0.24s; }

@keyframes drawCrack {
    to {
        stroke-dashoffset: 0;
    }
}

.fracture-jagged-seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(
        45deg,
        #ff2e63,
        #ff2e63 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.65;
}

.broken-caution-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff2e63 0%, #e11d48 100%);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(255, 46, 99, 0.45);
    white-space: nowrap;
    z-index: 10;
    animation: heartBeat 1.2s infinite;
}

/* Floating Broken Emojis Background Layer */
.broken-bg-emojis-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.broken-bg-emojis-layer.active {
    opacity: 1;
}

.broken-floating-item {
    position: absolute;
    user-select: none;
    pointer-events: none;
    line-height: 1;
    animation: floatBrokenItem 4s ease-in-out infinite alternate;
}

@keyframes floatBrokenItem {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.9);
    }
    50% {
        transform: translateY(-18px) rotate(-14deg) scale(1.1);
    }
    100% {
        transform: translateY(-34px) rotate(14deg) scale(1);
    }
}

.head-health-container {
    max-width: 440px;
    margin: 0 auto 20px;
}

.head-health-label-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #4a3b4a;
    margin-bottom: 6px;
}

.head-health-bar-track {
    width: 100%;
    height: 18px;
    background: #f0e6eb;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid #ffccd5;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.head-health-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #06d6a0 0%, #ffd166 60%, #ff4d79 100%);
    border-radius: var(--radius-full);
    transition: width 0.25s ease-out;
}

.bonk-stage {
    position: relative;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 20px;
    touch-action: manipulation;
}

.sumit-head-target {
    position: relative;
    width: 140px;
    height: 140px;
    background: #ffffff;
    border: 4px solid #ffccd5;
    border-radius: 50%;
    box-shadow: 0 12px 28px rgba(255, 77, 121, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease;
    z-index: 5;
}

.sumit-head-target:hover {
    transform: scale(1.04);
}

.head-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0f5;
}

.head-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: filter 0.25s ease, transform 0.2s ease;
}

/* Damaged states on photo */
.sumit-head-target.damaged-medium .head-avatar-img {
    filter: sepia(0.2) saturate(1.2);
}

.sumit-head-target.damaged-heavy .head-avatar-img {
    filter: sepia(0.4) saturate(1.4) hue-rotate(-20deg);
}

.sumit-head-target.damaged-broken .head-avatar-img {
    filter: grayscale(0.5) contrast(1.2) brightness(0.85);
    transform: rotate(12deg) scale(0.92);
}

/* Crack and Bandage Overlays */
.head-damage-crack {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 2.2rem;
    pointer-events: none;
    z-index: 6;
    animation: pulseDot 1s infinite;
}

.head-bandage-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 2rem;
    pointer-events: none;
    z-index: 6;
    transform: rotate(-25deg);
}

/* Forehead Kiss Animation */
.forehead-kiss-anim {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 35;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.forehead-kiss-anim.active {
    animation: kissPopAnim 1.6s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes kissPopAnim {
    0% {
        transform: translate(-50%, -60px) scale(0.2);
        opacity: 0;
    }
    25% {
        transform: translate(-50%, 15px) scale(1.4);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, 25px) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, 20px) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -30px) scale(1.2);
        opacity: 0;
    }
}

.kiss-lips {
    font-size: 4.5rem;
    filter: drop-shadow(0 6px 14px rgba(255, 46, 99, 0.45));
    animation: heartBeat 0.8s infinite;
}

.kiss-text {
    background: #ff4d79;
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(255, 77, 121, 0.4);
}

.head-target-crosshair {
    position: absolute;
    bottom: -10px;
    background: #ff4d79;
    color: white;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 77, 121, 0.4);
}

/* Hammer animation */
.cartoon-hammer {
    position: absolute;
    top: 25px;
    right: 50%;
    margin-right: -130px;
    font-size: 4.5rem;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform-origin: bottom right;
    transform: rotate(-50deg) scale(0.8);
    transition: opacity 0.1s;
}

.cartoon-hammer.striking {
    opacity: 1;
    animation: hammerSmash 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes hammerSmash {
    0% {
        transform: rotate(-65deg) scale(1) translate(-20px, -30px);
        opacity: 1;
    }
    45% {
        transform: rotate(20deg) scale(1.2) translate(15px, 20px);
        opacity: 1;
    }
    70% {
        transform: rotate(-10deg) scale(1.05) translate(0px, 0px);
        opacity: 1;
    }
    100% {
        transform: rotate(-50deg) scale(0.8) translate(-20px, -30px);
        opacity: 0;
    }
}

/* Head squashing upon impact */
.sumit-head-target.bonked {
    animation: headWobble 0.35s ease forwards;
}

@keyframes headWobble {
    0% { transform: scale(1.25, 0.65) translateY(12px); }
    30% { transform: scale(0.85, 1.2) rotate(-14deg) translateY(-8px); }
    60% { transform: scale(1.05, 0.95) rotate(10deg); }
    100% { transform: scale(1, 1) rotate(0deg); }
}

/* Comic Impact Text */
.bonk-comic-text {
    position: absolute;
    pointer-events: none;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: #ff2e63;
    text-shadow: 2px 2px 0px #fff, -2px -2px 0px #fff, 0px 4px 10px rgba(0,0,0,0.15);
    z-index: 20;
    animation: comicBurst 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes comicBurst {
    0% {
        transform: scale(0.3) rotate(-15deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.3) rotate(8deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) translateY(-50px) rotate(15deg);
        opacity: 0;
    }
}

/* Orbiting Dizzy Stars */
.dizzy-orbit {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 50px;
    z-index: 15;
    pointer-events: none;
    animation: spinOrbit 2s linear infinite;
}

@keyframes spinOrbit {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

.star-orbit {
    position: absolute;
    font-size: 1.6rem;
}
.star-orbit.s1 { top: 0; left: 10px; }
.star-orbit.s2 { bottom: 0; right: 20px; }
.star-orbit.s3 { top: 10px; right: 50%; }

/* Status Bar & Heal Button */
.headbreaker-status-bar {
    margin-top: 10px;
}

.head-status-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #2b1e2c;
    min-height: 32px;
    margin-bottom: 8px;
}

.head-counter-row {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.heal-btn {
    background: linear-gradient(135deg, #06d6a0 0%, #05be8d 100%);
    color: white;
    border: none;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(6, 214, 160, 0.35);
    animation: btnRadiate 2s infinite;
    transition: var(--transition-fast);
}

.heal-btn:hover {
    transform: scale(1.04);
}

/* ==========================================================================
   SECTION 6: SCRATCH-TO-REVEAL LOVE VOUCHERS
   ========================================================================== */
.vouchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.voucher-card {
    background: #ffffff;
    border: 1.5px solid #ffccd5;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 18px rgba(255, 182, 193, 0.2);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition-fast);
}

.voucher-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 143, 171, 0.25);
}

.voucher-inner {
    display: flex;
    align-items: stretch;
}

.voucher-stub {
    width: 65px;
    background: linear-gradient(180deg, #ff4d79 0%, #ff758c 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-right: 2px dashed #ffffff;
}

.stub-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.stub-icon {
    font-size: 1.6rem;
    margin-top: 8px;
}

.voucher-body {
    flex-grow: 1;
    padding: 18px 16px;
    position: relative;
}

.voucher-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #2b1e2c;
    margin-bottom: 4px;
}

.voucher-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.voucher-scratch-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffd166 0%, #ff8da1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 2;
}

.voucher-card.redeemed .voucher-scratch-cover {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

.voucher-status-badge {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    background: #06d6a0;
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.voucher-card.redeemed .voucher-status-badge {
    background: #ff4d79;
}

/* ==========================================================================
   SECTION: SUMIT'S SECRET SCRATCH-OFF DRAWING
   ========================================================================== */
.scratch-card-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.scratch-art-frame {
    position: relative;
    max-width: 530px;
    margin: 10px auto 0;
    padding: 16px 16px 12px;
    border-radius: 26px;
    background: #fffdf7;
    border: 8px solid #f6d365;
    outline: 4px solid #d4af37;
    box-shadow: 0 20px 45px rgba(212, 175, 55, 0.25), inset 0 0 20px rgba(212, 175, 55, 0.12);
}

.frame-ribbon-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4d79 0%, #f72585 100%);
    color: white;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 5px 20px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(255, 77, 121, 0.4);
    white-space: nowrap;
    z-index: 10;
}

.frame-plaque {
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #7b5904;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 4px 16px;
    border-radius: 8px;
    display: inline-block;
}

.scratch-canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    background: #fff;
    touch-action: none;
    user-select: none;
}

.scratch-under-img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 16px;
}

/* Floating sparkle particles from scratching */
.scratch-sparkle-dot {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    font-size: 1.4rem;
    animation: sparkleDust 0.7s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes sparkleDust {
    0% {
        transform: scale(0.6) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.3) translateY(-35px) rotate(45deg);
        opacity: 0;
    }
}

#scratch-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    transition: opacity 0.6s ease;
    border-radius: 18px;
    z-index: 5;
}

#scratch-canvas:active {
    cursor: grabbing;
}

.scratch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 500px;
    margin: 18px auto 0;
    gap: 12px;
    flex-wrap: wrap;
}

.scratch-percent-pill {
    background: #fff0f4;
    border: 1.5px solid #ffccd5;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    color: var(--primary);
}

.scratch-reveal-btn {
    font-size: 0.9rem;
    padding: 10px 22px;
}

/* ==========================================================================
   SECTION 7: HOLD FOR VIRTUAL HUG
   ========================================================================== */
.hug-mechanism {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.hug-heart-display {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hug-glow-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 121, 0.3) 0%, rgba(255, 77, 121, 0) 70%);
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform: scale(1);
    opacity: 0.4;
}

.hug-heart-icon {
    font-size: 5rem;
    position: relative;
    z-index: 2;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 18px rgba(255, 77, 121, 0.3));
}

.hug-percent {
    position: absolute;
    bottom: 10px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ff4d79;
    z-index: 3;
    background: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid #ffccd5;
}

.hug-instructions {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hug-action-btn {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #ff4d79 0%, #ff758c 100%);
    border: none;
    border-radius: var(--radius-full);
    padding: 16px 28px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 77, 121, 0.35);
    touch-action: none;
    user-select: none;
    transition: var(--transition-fast);
}

.hug-action-btn:active {
    transform: scale(0.96);
}

.hug-success-message {
    margin-top: 24px;
    background: #fff0f5;
    border: 2px solid #ffccd5;
    border-radius: var(--radius-md);
    padding: 20px;
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #ff4d79;
    margin-bottom: 6px;
}

.success-text {
    font-size: 0.95rem;
    color: #433827;
    line-height: 1.5;
}

/* ==========================================================================
   SECTION 8: 100 REASONS WHY YOU ARE AMAZING
   ========================================================================== */
.dispenser-container {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
}

.reason-card {
    background: #ffffff;
    border: 2px solid #ffd3e0;
    border-radius: var(--radius-md);
    padding: 30px 24px;
    margin-bottom: 22px;
    box-shadow: 0 8px 22px rgba(255, 143, 171, 0.15);
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.reason-tag {
    position: absolute;
    top: -12px;
    background: #ff4d79;
    color: white;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
}

.reason-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: avatarBounce 2s infinite;
}

.reason-quote {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #2b1e2c;
    line-height: 1.45;
}

.draw-reason-btn {
    font-size: 1.1rem;
    padding: 14px 34px;
}

/* ==========================================================================
   SECTION 9: SWEET PERSONAL NOTE
   ========================================================================== */
.letter-box {
    background: #ffffff;
    border: 1px solid #ffd3e0;
    border-radius: var(--radius-md);
    padding: 36px 30px;
    box-shadow: 0 10px 28px rgba(255, 143, 171, 0.14);
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.letter-stamp-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.2rem;
}

.letter-salutation {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #ff4d79;
    margin-bottom: 16px;
}

.letter-para {
    font-size: 1rem;
    color: #3b2e3c;
    line-height: 1.7;
    margin-bottom: 14px;
}

.letter-signature-block {
    text-align: right;
    margin-top: 24px;
}

.letter-ending {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.signature-name {
    font-family: var(--font-hand);
    font-size: 1.85rem;
    font-weight: 700;
    color: #ff4d79;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 40px 10px 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-heart-anim {
    font-size: 1.8rem;
    animation: heartBeat 1.4s infinite;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-text {
    margin-bottom: 6px;
}

.footer-sub {
    font-size: 0.78rem;
    opacity: 0.8;
    margin-bottom: 18px;
}

.footer-sub code {
    background: #ffe5ec;
    color: #ff4d79;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.back-to-top-btn {
    background: white;
    border: 1px solid #ffd3e0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    color: #ff4d79;
    cursor: pointer;
    transition: var(--transition-fast);
}

.back-to-top-btn:hover {
    background: #ffe5ec;
    transform: translateY(-2px);
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 15, 0.88);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border: 4px solid white;
}

.lightbox-caption {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-top: 14px;
    text-align: center;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE-FIRST POLISH)
   ========================================================================== */
@media (max-width: 640px) {
    .page-container {
        padding: 70px 14px 40px;
    }

    .top-nav-bar {
        padding: 6px 12px;
    }

    .nav-tagline {
        font-size: 0.82rem;
    }

    .nav-icon-btn {
        padding: 5px 9px;
        font-size: 0.75rem;
    }

    .hero-section {
        padding: 20px 5px 20px;
    }

    .emergency-action-card {
        padding: 24px 16px;
    }

    .emergency-button {
        padding: 14px 18px;
    }

    .btn-core-text {
        font-size: 1.05rem;
    }

    .section-card {
        padding: 26px 16px;
        border-radius: 20px;
    }

    .polaroid-grid {
        grid-template-columns: 1fr;
        max-width: 330px;
        margin: 0 auto;
    }

    .polaroid-card {
        height: 390px;
    }

    .img-wrapper {
        height: 230px;
    }

    .parchment-document {
        padding: 22px 16px;
    }

    .stamp-btn {
        width: 100%;
    }
}
