/* =============================================
   A Little Website for Ilbira Callysta
   Romantic Digital Love Letter & Scrapbook
   ============================================= */

/* CSS Variables */
:root {
    --primary-pink: #FF6B9D;
    --peach: #FFB5A7;
    --light-purple: #C9B1FF;
    --cream: #FFF5F0;
    --pastel-red: #FF8FA3;
    --soft-gold: #FFD93D;
    --deep-rose: #E84A6F;
    --white: #FFFFFF;
    --charcoal: #2D2D2D;
    --light-charcoal: #4A4A4A;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Quicksand', 'Segoe UI', sans-serif;
    --font-code: 'Fira Code', 'Consolas', monospace;
    
    --shadow-soft: 0 10px 40px rgba(255, 107, 157, 0.15);
    --shadow-medium: 0 15px 50px rgba(255, 107, 157, 0.2);
    --shadow-strong: 0 20px 60px rgba(255, 107, 157, 0.25);
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 157, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 177, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 181, 167, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

/* Canvas Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Floating Hearts - Always behind content */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 1.5rem;
    color: var(--primary-pink);
    opacity: 0;
    animation: floatHeart var(--duration, 6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
    z-index: 1;
}

@keyframes floatHeart {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.5;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 0.3;
        transform: translateY(10vh) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(0);
    }
}

/* =============================================
   NAVIGATION - Responsive Hamburger Menu
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 1rem;
    z-index: 998;
    background: linear-gradient(180deg, rgba(255, 245, 240, 0.98) 0%, rgba(255, 245, 240, 0.95) 100%);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 20px rgba(255, 107, 157, 0.1);
}

/* Hamburger Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.nav-toggle:hover {
    background: rgba(255, 107, 157, 0.1);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    margin: 3px 0;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    max-width: 100%;
    transition: var(--transition-smooth);
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--light-charcoal);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-pink);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--primary-pink);
}

.nav-links a:hover::after {
    width: 60%;
}

/* Sections - Consistent Spacing */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Section Titles - Responsive */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 600;
    color: var(--charcoal);
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--light-purple));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--light-charcoal);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* =============================================
   LANDING SECTION - Responsive
   ============================================= */
.landing {
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(255, 245, 240, 0.95) 0%, 
        rgba(255, 181, 167, 0.1) 100%);
    position: relative;
    overflow: hidden;
    padding: 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.landing::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 107, 157, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(201, 177, 255, 0.08) 0%, transparent 40%);
    animation: rotateBg 30s linear infinite;
    z-index: 0;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.landing-content {
    position: relative;
    z-index: 10;
    padding: 0 1rem;
    max-width: 800px;
}

.title {
    margin-bottom: 1.5rem;
}

.title-text {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--light-charcoal);
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
}

.title-name {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-pink), var(--deep-rose), var(--light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.3));
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
    line-height: 1.2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--light-charcoal);
    min-height: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.2s;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.typewriter {
    display: inline;
}

.cursor {
    display: inline-block;
    color: var(--primary-pink);
    animation: blink 1s infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--light-charcoal);
    font-size: 0.75rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2s;
    z-index: 5;
    pointer-events: none;
}

.scroll-arrow {
    font-size: 1.3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* =============================================
   WHY SECTION
   ============================================= */
.why-section {
    background: linear-gradient(180deg, 
        rgba(255, 181, 167, 0.1) 0%, 
        rgba(255, 245, 240, 0.95) 50%,
        rgba(201, 177, 255, 0.1) 100%);
}

.story-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease;
    z-index: 10;
}

.story-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.heart-decoration {
    position: absolute;
    font-size: 1.2rem;
    color: var(--pastel-red);
    opacity: 0.4;
}

.heart-decoration.top-left { top: 15px; left: 15px; }
.heart-decoration.top-right { top: 15px; right: 15px; }
.heart-decoration.bottom-left { bottom: 15px; left: 15px; }
.heart-decoration.bottom-right { bottom: 15px; right: 15px; }

.story-text {
    font-size: 1rem;
    color: var(--light-charcoal);
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.story-text .highlight {
    color: var(--primary-pink);
    font-weight: 600;
}

.code-block {
    background: #1E1E2E;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-top: 1.5rem;
    text-align: left;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-block code {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #CDD6F4;
    line-height: 1.5;
    display: block;
    white-space: pre;
}

.code-block .keyword { color: #CBA6F7; }
.code-block .variable { color: #F5C2E7; }
.code-block .string { color: #A6E3A1; }
.code-block .comment { color: #6C7086; font-style: italic; }

/* =============================================
   CODE SECTION
   ============================================= */
.code-section {
    background: var(--white);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.code-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.code-card {
    background: #1E1E2E;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 10;
}

.code-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.code-card:nth-child(1) { transition-delay: 0.1s; }
.code-card:nth-child(2) { transition-delay: 0.15s; }
.code-card:nth-child(3) { transition-delay: 0.2s; }

.code-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.code-header {
    background: #181825;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.code-dot.red { background: #F38BA8; }
.code-dot.yellow { background: #FAB387; }
.code-dot.green { background: #A6E3A1; }

.filename {
    margin-left: auto;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #6C7086;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-content {
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-content code {
    font-family: var(--font-code);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #CDD6F4;
    display: block;
    white-space: pre;
}

.code-content .keyword { color: #CBA6F7; }
.code-content .function { color: #89B4FA; }
.code-content .variable { color: #F5C2E7; }
.code-content .string { color: #A6E3A1; }
.code-content .number { color: #FAB387; }
.code-content .property { color: #94E2D5; }
.code-content .comment { color: #6C7086; font-style: italic; }
.code-content .class-name { color: #F9E2AF; }

/* =============================================
   DECODE LOVE SECTION
   ============================================= */
.decode-section {
    background: linear-gradient(180deg,
        rgba(255, 245, 240, 0.95) 0%,
        rgba(255, 181, 167, 0.15) 50%,
        rgba(201, 177, 255, 0.1) 100%);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.decode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.decode-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    transform: translateY(20px);
    opacity: 0;
    z-index: 10;
}

.decode-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.decode-card:nth-child(1) { transition-delay: 0.05s; }
.decode-card:nth-child(2) { transition-delay: 0.08s; }
.decode-card:nth-child(3) { transition-delay: 0.11s; }
.decode-card:nth-child(4) { transition-delay: 0.14s; }
.decode-card:nth-child(5) { transition-delay: 0.17s; }
.decode-card:nth-child(6) { transition-delay: 0.2s; }

.decode-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.decode-code {
    background: #1E1E2E;
    border-radius: 10px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.decode-code pre {
    margin: 0;
}

.decode-code code {
    font-family: var(--font-code);
    font-size: 0.75rem;
    line-height: 1.5;
    color: #CDD6F4;
    white-space: pre-wrap;
    word-wrap: break-word;
    display: block;
}

.decode-code .keyword { color: #CBA6F7; }
.decode-code .variable { color: #F5C2E7; }
.decode-code .string { color: #A6E3A1; }
.decode-code .number { color: #FAB387; }
.decode-code .property { color: #94E2D5; }
.decode-code .function { color: #89B4FA; }

.decode-explanation, .decode-meaning {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 107, 157, 0.12);
}

.decode-explanation:last-child, .decode-meaning:last-child {
    border-bottom: none;
}

.decode-explanation h4, .decode-meaning h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.decode-explanation h4 {
    color: var(--light-charcoal);
}

.decode-meaning h4 {
    color: var(--primary-pink);
}

.badge {
    background: linear-gradient(135deg, var(--light-purple), var(--peach));
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.heart-badge {
    background: linear-gradient(135deg, var(--primary-pink), var(--deep-rose));
}

.decode-explanation p {
    font-size: 0.85rem;
    color: var(--light-charcoal);
    line-height: 1.5;
    padding-left: 0;
}

.romantic-text {
    font-size: 0.9rem;
    color: var(--charcoal);
    font-style: italic;
    line-height: 1.6;
    padding-left: 0;
}

/* =============================================
   MEMORIES SECTION
   ============================================= */
.memories-section {
    background: linear-gradient(180deg, 
        rgba(255, 245, 240, 0.95) 0%, 
        rgba(201, 177, 255, 0.1) 100%);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.memory-card {
    height: 260px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Desktop-only hover preview (touch devices use the .flipped class via tap) */
@media (hover: hover) and (pointer: fine) {
    .memory-card:hover .card-inner {
        transform: rotateY(180deg);
    }
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.card-front {
    background: linear-gradient(145deg, var(--white), var(--cream));
    box-shadow: var(--shadow-soft);
    border: 2px solid rgba(255, 107, 157, 0.08);
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.04) 0%, 
        rgba(201, 177, 255, 0.04) 100%);
    z-index: 0;
}

.card-front > * {
    position: relative;
    z-index: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.card-front h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
}

.card-hearts {
    color: var(--primary-pink);
    font-size: 1rem;
    letter-spacing: 0.2rem;
    opacity: 0.7;
}

.card-back {
    background: linear-gradient(145deg, var(--primary-pink), var(--deep-rose));
    color: var(--white);
    transform: rotateY(180deg);
}

.card-back p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.doodle {
    font-size: 1.3rem;
    opacity: 0.8;
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* =============================================
   MESSAGE SECTION
   ============================================= */
.message-section {
    background: linear-gradient(180deg,
        rgba(201, 177, 255, 0.1) 0%,
        rgba(255, 245, 240, 0.95) 50%,
        rgba(255, 181, 167, 0.1) 100%);
}

.message-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-strong);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease;
    z-index: 10;
}

.message-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.message-hearts {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.message-hearts span {
    font-size: 1.3rem;
    color: var(--primary-pink);
    animation: heartBeat 1.5s ease-in-out infinite;
}

.message-hearts span:nth-child(1) { animation-delay: 0s; }
.message-hearts span:nth-child(2) { animation-delay: 0.15s; }
.message-hearts span:nth-child(3) { animation-delay: 0.3s; }

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.message-hearts.reverse span {
    animation-delay: 0.2s;
}

.message-hearts.reverse span:nth-child(1) { animation-delay: 0.2s; }
.message-hearts.reverse span:nth-child(2) { animation-delay: 0.35s; }
.message-hearts.reverse span:nth-child(3) { animation-delay: 0.5s; }

.message-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--charcoal);
    text-align: center;
    margin-bottom: 1.5rem;
}

.message-text {
    font-size: 1rem;
    color: var(--light-charcoal);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    text-align: center;
}

/* =============================================
   CONFESSION SECTION
   ============================================= */
.confession-section {
    background: linear-gradient(180deg,
        rgba(255, 181, 167, 0.1) 0%,
        rgba(255, 107, 157, 0.12) 50%,
        rgba(201, 177, 255, 0.1) 100%);
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.confession-content {
    max-width: 700px;
    margin: 0 auto;
    z-index: 10;
}

.confession-code {
    background: #1E1E2E;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.8s ease;
    z-index: 10;
}

.confession-code.visible {
    transform: translateY(0);
    opacity: 1;
}

.confession-code code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #CDD6F4;
    line-height: 1.6;
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.confession-code .keyword { color: #CBA6F7; }
.confession-code .variable { color: #F5C2E7; }
.confession-code .property { color: #94E2D5; }
.confession-code .string { color: #A6E3A1; }

.confession-question {
    margin-bottom: 2rem;
}

.pulsing-heart {
    font-size: 3rem;
    color: var(--primary-pink);
    margin-bottom: 1rem;
    animation: pulseHeart 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulseHeart {
    0% { 
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    }
    50% { 
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(255, 107, 157, 0.6);
    }
    100% { 
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    }
}

.final-question {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.4;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary-pink), var(--deep-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.response-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-yes, .btn-maybe {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 100px;
    justify-content: center;
}

.btn-yes {
    background: linear-gradient(135deg, var(--primary-pink), var(--deep-rose));
    color: var(--white);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.35);
}

.btn-yes:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.45);
}

.btn-maybe {
    background: var(--white);
    color: var(--light-charcoal);
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--light-purple);
}

.btn-maybe:hover {
    transform: translateY(-2px);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
}

.btn-heart {
    font-size: 1.1rem;
}

.response-message {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-pink);
    min-height: 1.5rem;
    padding: 0 1rem;
}

/* Sparkle effect */
.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.sparkle-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--soft-gold);
    border-radius: 50%;
    animation: sparkleAnim 0.8s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(180deg);
        opacity: 0;
    }
}

/* Footer */
.footer {
    background: linear-gradient(180deg, 
        rgba(255, 245, 240, 0.95) 0%, 
        rgba(255, 181, 167, 0.2) 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--light-charcoal);
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.footer-heart {
    color: var(--primary-pink);
    font-size: 1rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

/* =============================================
   ENHANCED RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
    .title-name {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .landing {
        padding-top: 5rem;
    }
}

@media (max-width: 768px) {
    /* Navigation - dropdown menu + comfortable touch targets (min 44px) */
    .nav {
        padding: 0.7rem 0.5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 245, 240, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0;
        box-shadow: 0 4px 20px rgba(255, 107, 157, 0.15);
    }
    
    .nav-links.active {
        max-height: 400px;
        opacity: 1;
        padding: 1rem 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.7rem 0.9rem;
        width: 100%;
        text-align: center;
        border-radius: 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links a:hover {
        background: rgba(255, 107, 157, 0.08);
    }
    
    /* Landing */
    .title-text {
        font-size: 1.2rem;
    }
    
    .title-name {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
    
    .section {
        padding: 4rem 1rem 2.5rem;
        min-height: auto;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.3rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    /* Cards and content */
    .story-card {
        padding: 1.5rem 1rem;
    }
    
    .story-text {
        font-size: 0.9rem;
    }
    
    .code-block {
        padding: 0.8rem 1rem;
    }
    
    .code-block code {
        font-size: 0.75rem;
    }
    
    /* Code cards */
    .code-cards {
        gap: 1rem;
    }
    
    .code-card {
        border-radius: 12px;
    }
    
    /* Decode cards */
    .decode-cards {
        gap: 1rem;
    }
    
    .decode-card {
        padding: 1rem;
    }
    
    /* Memory cards */
    .memories-grid {
        gap: 1rem;
    }
    
    .memory-card {
        height: 240px;
    }
    
    .card-front, .card-back {
        padding: 1.2rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .card-front h3 {
        font-size: 1.1rem;
    }
    
    .card-back p {
        font-size: 0.85rem;
    }
    
    /* Message section */
    .message-card {
        padding: 1.5rem 1rem;
    }
    
    .message-title {
        font-size: 1.6rem;
    }
    
    .message-text {
        font-size: 0.9rem;
    }
    
    /* Confession */
    .confession-section {
        padding-top: 3rem;
        padding-bottom: 2.5rem;
    }
    
    .confession-content {
        padding: 0 0.5rem;
        width: 100%;
    }
    
    .confession-code {
        max-width: 90%;
        margin: 0 auto 1.5rem auto;
        padding: 1rem;
        overflow-x: auto;
    }
    
    .confession-code code {
        font-size: 0.75rem;
    }
    
    .confession-question {
        padding: 0 0.5rem;
    }
    
    .final-question {
        font-size: 1.3rem;
    }
    
    .pulsing-heart {
        font-size: 2.2rem;
    }
    
    .response-buttons {
        padding: 0 1rem;
        width: 100%;
    }
    
    .btn-yes, .btn-maybe {
        width: 70%;
        max-width: 220px;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        margin: 0.5rem auto;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Reduce floating hearts on mobile */
    .floating-heart {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .title-text {
        font-size: 1rem;
    }
    
    .title-name {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .section-subtitle {
        text-align: center;
        padding: 0 0.5rem;
    }
    
    /* Landing - ensure centered */
    .landing-content {
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .title {
        text-align: center;
    }
    
    /* Story card - center everything */
    .story-card {
        text-align: center;
        padding: 1.2rem 0.8rem;
        margin: 0 0.5rem;
    }
    
    .story-text {
        text-align: center;
    }
    
    .code-block {
        text-align: left;
        margin: 1rem 0.5rem;
        max-width: calc(100% - 1rem);
        padding: 0.8rem;
    }
    
    /* Code cards - center the grid */
    .code-cards {
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .code-card {
        text-align: left;
        margin: 0 auto 1rem auto;
        max-width: 100%;
    }
    
    /* Decode cards - center */
    .decode-cards {
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .decode-card {
        text-align: left;
        margin: 0 auto 1rem auto;
        max-width: 100%;
        padding: 1rem;
    }
    
    .decode-explanation h4,
    .decode-meaning h4 {
        justify-content: flex-start;
    }
    
    .decode-explanation p,
    .romantic-text {
        text-align: left;
    }
    
    /* Memory cards - center grid */
    .memories-grid {
        text-align: center;
        padding: 0 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .memory-card {
        margin: 0 auto;
        width: 100%;
        max-width: 320px;
        height: 280px;
    }
    
    .card-icon {
        font-size: 3rem;
    }
    
    .card-front h3 {
        font-size: 1.3rem;
    }
    
    .card-back p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    /* Message section - center */
    .message-card {
        text-align: center;
        padding: 1.2rem 0.8rem;
        margin: 0 0.5rem;
    }
    
    .message-title {
        text-align: center;
    }
    
    .message-text {
        text-align: center;
    }
    
    /* Confession Section - Mobile Fixes */
    .confession-section {
        padding: 2.5rem 0.5rem 2rem;
        text-align: center;
    }
    
    .confession-content {
        padding: 0 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .confession-code {
        padding: 0.8rem;
        margin: 0 auto 1.5rem auto;
        border-radius: 12px;
        text-align: left;
        max-width: 90%;
        overflow-x: auto;
    }
    
    .confession-code code {
        font-size: 0.65rem;
        line-height: 1.4;
    }
    
    .confession-question {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
        text-align: center;
    }
    
    .pulsing-heart {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .final-question {
        font-size: 1.1rem;
        line-height: 1.4;
        text-align: center;
    }
    
    .response-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        padding: 0 1rem;
        width: 100%;
    }
    
    .btn-yes, .btn-maybe {
        width: 80%;
        max-width: 200px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        margin: 0 auto;
    }
    
    .response-message {
        font-size: 1rem;
        padding: 0 0.5rem;
        text-align: center;
        margin-top: 1rem;
    }
    
    /* Footer */
    .footer {
        text-align: center;
        padding: 1.2rem 0.8rem;
    }
    
    /* Ensure all sections are centered */
    .section {
        padding: 3rem 0.5rem 2rem;
        min-height: auto;
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .code-card:hover,
    .decode-card:hover {
        transform: none;
    }
    
    .btn-yes:active {
        transform: scale(0.98);
    }
    
    .btn-maybe:active {
        transform: scale(0.98);
    }
}

/* Ensure content stays above animations */
.section > * {
    position: relative;
    z-index: 10;
}

/* Better code overflow handling */
pre, code {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =============================================
   FLOATING MUSIC PLAYER
   ============================================= */
.music-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    min-width: 48px;
    min-height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink), var(--deep-rose));
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 997; /* above content, below nav dropdown (998/1001) */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    -webkit-tap-highlight-color: transparent;
}

.music-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-medium);
}

.music-toggle:active {
    transform: scale(0.95);
}

/* Icon switching: play visible by default, pause hidden */
.music-toggle .icon-pause {
    display: none;
}

.music-toggle.playing .icon-play {
    display: none;
}

.music-toggle.playing .icon-pause {
    display: inline-block;
    animation: gentlePulse 1.6s ease-in-out infinite;
}

/* Very small / short screens: lift button so it never covers
   the Yes/Maybe buttons or other touch targets */
@media (max-width: 480px) {
    .music-toggle {
        width: 48px;
        height: 48px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.2rem;
    }
}

@media (max-height: 600px) {
    .music-toggle {
        bottom: 5rem;
    }
}

/* Smoother scrolling */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

