/* assets/css/style.css - Afham Romantic Proposal Site Styling */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Dancing+Script:wght@600;700&family=Gulzar&family=Noto+Nastaliq+Urdu:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&family=Sacramento&display=swap');

:root {
    --bg-dark: #0b0410;
    --bg-card: rgba(25, 12, 35, 0.65);
    --bg-card-hover: rgba(45, 20, 60, 0.75);
    --accent-rose: #ff2a6d;
    --accent-pink: #ff758c;
    --accent-gold: #ffb3c6;
    --accent-gold-glowing: #ffd700;
    --text-primary: #fff0f5;
    --text-muted: #d1b3ca;
    --font-heading: 'Cinzel Decorative', cursive, serif;
    --font-handwriting: 'Dancing Script', cursive;
    --font-body: 'Outfit', sans-serif;
    --font-urdu: 'Noto Nastaliq Urdu', 'Gulzar', serif;
    --glass-border: rgba(255, 179, 198, 0.18);
    --shadow-glow: 0 0 25px rgba(255, 42, 109, 0.35);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Urdu Nastaliq Calligraphy Styling */
.urdu-text {
    font-family: var(--font-urdu);
    direction: rtl;
    unicode-bidi: embed;
    text-align: center;
    line-height: 2.2;
    font-size: clamp(1.8rem, 4.2vw, 3rem);
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 179, 198, 0.4);
    letter-spacing: 0;
}

.urdu-subtext {
    font-family: var(--font-urdu);
    direction: rtl;
    unicode-bidi: embed;
    text-align: center;
    line-height: 2;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--accent-pink);
    margin-top: 15px;
    text-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

/* Background Floating Hearts Canvas & Petals Canvas */
#heartsCanvas, #petalsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Story Section Gating & Locks */
.story-step {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.locked-step {
    display: none !important;
    opacity: 0;
    transform: translateY(30px);
}

.active-step {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* Audio Player Floating Controller */
.audio-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(20, 10, 30, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-widget:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-rose);
}

.audio-icon {
    color: var(--accent-rose);
    font-size: 1.2rem;
    animation: pulse 1.5s infinite;
}

.audio-text {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Global Container & Typography */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section {
    padding: 90px 0;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(135deg, #fff, var(--accent-gold), var(--accent-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 42, 109, 0.2);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-weight: 300;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(40, 15, 55, 0.6) 0%, var(--bg-dark) 70%),
                url('../images/hero_bg.jpg') no-repeat center center/cover;
    text-align: center;
    padding: 40px 20px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(11, 4, 16, 0.4), var(--bg-dark));
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 30px;
    background: rgba(255, 42, 109, 0.15);
    border: 1px solid var(--accent-rose);
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 42, 109, 0.6);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--accent-gold);
    margin-bottom: 35px;
    font-weight: 300;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-pink));
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.35s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 0 40px rgba(255, 42, 109, 0.7);
}

/* CINEMATIC URDU POETRY SECTIONS */

/* Poetry 1: Eyes & Moon Scene */
.eyes-moon-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, #151a36 0%, #070914 80%);
    border-radius: 35px;
    padding: 60px 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(100, 149, 237, 0.25);
    box-shadow: 0 0 50px rgba(10, 15, 35, 0.8);
}

.glowing-moon {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f4e8c1 60%, #d4af37 100%);
    box-shadow: 0 0 60px rgba(255, 235, 170, 0.8), 0 0 120px rgba(255, 215, 0, 0.3);
    margin-bottom: 40px;
    transition: opacity 2.5s ease, filter 2.5s ease, transform 2.5s ease;
}

.glowing-moon.moon-faded {
    opacity: 0.35;
    filter: blur(5px);
    transform: scale(0.9);
}

/* Poetry 2: Rose Comparison Scene */
.rose-poetry-card {
    background: radial-gradient(circle at center, #2e0819 0%, #0d0208 85%);
    border: 2px solid var(--accent-rose);
    border-radius: 30px;
    padding: 60px 30px;
    position: relative;
    box-shadow: 0 0 45px rgba(255, 42, 109, 0.35);
}

.blooming-rose-icon {
    font-size: 4rem;
    color: var(--accent-rose);
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px var(--accent-rose));
    animation: roseBloom 3s ease-in-out infinite alternate;
}

/* Symbolic Presence Container (Chapter: Your Picture Wasn't Needed ❤️) */
.no-photo-card {
    background: radial-gradient(circle at 50% 30%, #1a0826 0%, #06020c 85%);
    border: 2px solid var(--accent-rose);
    border-radius: 35px;
    padding: 65px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(255, 42, 109, 0.4);
}

.symbolic-presence-box {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 35px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 117, 140, 0.3) 0%, rgba(11, 4, 16, 0.95) 75%);
    border: 2px dashed var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px rgba(255, 117, 140, 0.4);
    animation: floatFrame 4s ease-in-out infinite;
}

.symbolic-rose-glow {
    font-size: 4.5rem;
    color: var(--accent-rose);
    filter: drop-shadow(0 0 25px var(--accent-rose)) drop-shadow(0 0 50px var(--accent-pink));
    animation: pulse 2.5s infinite;
}

.butterfly-icon {
    position: absolute;
    font-size: 1.5rem;
    color: var(--accent-gold);
    filter: drop-shadow(0 0 10px var(--accent-gold));
    animation: floatFrame 3s ease-in-out infinite alternate;
}

.b-1 { top: 15px; left: 20px; animation-delay: 0.2s; }
.b-2 { bottom: 20px; right: 25px; animation-delay: 0.7s; }

/* Playful Countdown Section ("Your Decision 😄❤️") */
.funny-countdown-card {
    background: radial-gradient(circle at center, #1f122e 0%, #0a0412 90%);
    border: 2px solid var(--accent-gold);
    border-radius: 32px;
    padding: 60px 30px;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    text-align: center;
}

.funny-clock-anim {
    font-size: 4.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    display: inline-block;
    animation: clockBounce 1.5s infinite ease-in-out alternate;
    filter: drop-shadow(0 0 20px var(--accent-gold));
}

.countdown-day-ticker {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--accent-rose);
    margin: 20px 0;
    text-shadow: 0 0 25px var(--accent-rose);
    min-height: 80px;
}

.waiting-status-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--accent-gold);
    border-radius: 20px;
    padding: 25px;
    margin-top: 25px;
    display: none;
    animation: zoomIn 0.5s ease forwards;
}

@keyframes clockBounce {
    0% { transform: translateY(0) rotate(-10deg); }
    100% { transform: translateY(-12px) rotate(10deg); }
}

/* Minimal Black/Navy Poetry Screen (Chapters 09 & 10) */
.minimal-poetry-screen {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #040207;
    border-radius: 30px;
    padding: 70px 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.9);
}

.minimal-line-1 {
    font-family: var(--font-urdu);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease forwards;
}

.minimal-line-2 {
    font-family: var(--font-urdu);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: var(--accent-gold);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s ease forwards;
    margin-top: 25px;
    text-shadow: 0 0 25px var(--accent-rose);
}

/* Secret Tap Surprise Box (Chapter 11) */
.secret-poetry-box {
    background: rgba(20, 8, 30, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid var(--accent-rose);
    border-radius: 28px;
    padding: 50px 30px;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.secret-heart-tap {
    font-size: 4rem;
    color: var(--accent-rose);
    margin: 20px 0;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 15px var(--accent-rose));
    animation: heartbeat 1.5s infinite;
}

.secret-heart-tap:hover {
    transform: scale(1.25);
    filter: drop-shadow(0 0 30px var(--accent-rose));
}

/* Pre-Proposal Quiet Emotional Scene (Chapter 13) */
.quiet-proposal-screen {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #18051d 0%, #050107 90%);
    border-radius: 35px;
    padding: 70px 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

/* SPECIAL PROPOSAL PHOTO POSTER SECTION ("A Rose For You 🌹") */
.rose-poster-wrapper {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    border-radius: 35px;
    overflow: hidden;
    background: rgba(15, 6, 22, 0.9);
    border: 2px solid var(--accent-rose);
    box-shadow: 0 0 50px rgba(255, 42, 109, 0.4), inset 0 0 30px rgba(255, 42, 109, 0.15);
    padding: 60px 30px;
}

.poster-bg-blur {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(30px);
    opacity: 0.28;
    transform: scale(1.2);
    z-index: 1;
    pointer-events: none;
}

.poster-content-layer {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-frame-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin-bottom: 35px;
}

.photo-frame-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-gold);
    box-shadow: 0 0 40px rgba(255, 42, 109, 0.7), inset 0 0 20px rgba(0,0,0,0.5);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatFrame 4s infinite ease-in-out;
}

.photo-frame-container:hover .photo-frame-img {
    transform: scale(1.05);
    border-color: var(--accent-rose);
}

.rose-corner-decor {
    position: absolute;
    font-size: 2.2rem;
    color: var(--accent-rose);
    filter: drop-shadow(0 0 10px var(--accent-rose));
    animation: pulse 2s infinite;
}

.rose-decor-topleft { top: -10px; left: -10px; }
.rose-decor-bottomright { bottom: -10px; right: -10px; }

/* Typewriter & Reveal Text */
.rose-typewriter-box {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

.rose-line {
    font-family: var(--font-handwriting);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--accent-gold);
    margin-bottom: 18px;
    min-height: 45px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s ease forwards;
    text-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

.rose-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

.rose-line.highlight-heart {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    text-shadow: 0 0 25px var(--accent-rose);
}

/* Digital Heartbeat Section */
.heartbeat-container {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.heartbeat-container:hover {
    border-color: var(--accent-rose);
}

.big-heart {
    font-size: 5rem;
    color: var(--accent-rose);
    animation: heartbeat 1.2s infinite ease-in-out;
    filter: drop-shadow(0 0 20px var(--accent-rose));
    user-select: none;
}

.heartbeat-rate {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-top: 10px;
}

.heartbeat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Memories Timeline Grid */
.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.memory-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.memory-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-pink);
    box-shadow: var(--shadow-glow);
}

.memory-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

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

.memory-card:hover .memory-img {
    transform: scale(1.08);
}

.memory-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(11, 4, 16, 0.85);
    border: 1px solid var(--accent-rose);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.memory-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.memory-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.memory-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Promises Grid */
.promises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.promise-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.promise-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(255, 179, 198, 0.25);
}

.promise-icon {
    font-size: 2.2rem;
    color: var(--accent-rose);
    margin-bottom: 15px;
}

.promise-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.promise-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Envelope & Sealed Letter */
.envelope-wrapper {
    max-width: 650px;
    margin: 0 auto;
    perspective: 1000px;
}

.envelope {
    background: linear-gradient(135deg, #2a0833, #15021a);
    border: 1px solid var(--accent-rose);
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s ease;
}

.envelope-seal {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-rose), #b3003b);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.8);
    border: 2px solid var(--accent-gold);
}

.letter-paper {
    background: #fffdf9;
    color: #2b172a;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-family: var(--font-handwriting);
    font-size: 1.7rem;
    line-height: 1.8;
    text-align: left;
    margin-top: 20px;
    display: none;
    animation: fadeInDown 0.8s ease forwards;
}

/* Proposal Section & Dodging Button */
.proposal-box {
    background: radial-gradient(circle at center, rgba(60, 20, 80, 0.8) 0%, rgba(15, 5, 20, 0.95) 100%);
    border: 2px solid var(--accent-rose);
    border-radius: 30px;
    padding: 60px 30px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-glow);
}

.proposal-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: #ffffff;
    margin-bottom: 40px;
    text-shadow: 0 0 30px rgba(255, 42, 109, 0.8);
}

.proposal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    min-height: 100px;
    position: relative;
}

.btn-yes {
    padding: 18px 45px;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-rose), #ff0055);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 42, 109, 0.6);
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-yes:hover {
    transform: scale(1.12);
    box-shadow: 0 0 50px rgba(255, 42, 109, 0.9);
}

.btn-no {
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* Celebration Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 3, 15, 0.92);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: linear-gradient(135deg, rgba(40, 15, 55, 0.95), rgba(20, 5, 30, 0.95));
    border: 2px solid var(--accent-gold);
    border-radius: 28px;
    padding: 50px 35px;
    max-width: 650px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 179, 198, 0.5);
    animation: zoomIn 0.5s ease forwards;
}

.modal-heart {
    font-size: 4.5rem;
    color: var(--accent-rose);
    margin-bottom: 20px;
    animation: heartbeat 1s infinite;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.modal-text {
    font-size: 1.15rem;
    color: #ffffff;
    line-height: 1.8;
    white-space: pre-line;
    margin-bottom: 30px;
}

/* Keyframe Animations */
@keyframes roseBloom {
    0% { transform: scale(0.9) rotate(-5deg); filter: drop-shadow(0 0 15px var(--accent-rose)); }
    100% { transform: scale(1.1) rotate(5deg); filter: drop-shadow(0 0 35px var(--accent-pink)); }
}

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

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

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

/* Comprehensive Mobile Responsiveness & Overflow-X Prevention */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Container Responsiveness */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Urdu Calligraphy Fluid Font Sizes for Mobile */
.urdu-text {
    font-family: var(--font-urdu);
    direction: rtl;
    unicode-bidi: embed;
    text-align: center;
    line-height: 2.1;
    font-size: clamp(1.4rem, 4.5vw, 2.8rem);
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(255, 179, 198, 0.4);
    letter-spacing: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.urdu-subtext {
    font-family: var(--font-urdu);
    direction: rtl;
    unicode-bidi: embed;
    text-align: center;
    line-height: 1.9;
    font-size: clamp(1.2rem, 3.5vw, 1.9rem);
    color: var(--accent-pink);
    margin-top: 15px;
    text-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive Overrides & Mobile Queries */
@media (max-width: 768px) {
    .section { 
        padding: 55px 0; 
    }
    
    .hero-section {
        padding: 60px 16px;
        min-height: 90vh;
    }

    .hero-badge {
        padding: 6px 16px;
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .hero-title { 
        font-size: clamp(2rem, 8vw, 3.2rem);
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3.5vw, 1.25rem);
        margin-bottom: 25px;
    }

    .btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .audio-widget {
        top: 12px;
        right: 12px;
        padding: 7px 14px;
    }
    
    .audio-text {
        font-size: 0.75rem;
    }

    /* Cards & Containers Mobile Fitting */
    .eyes-moon-container,
    .rose-poetry-card,
    .no-photo-card,
    .funny-countdown-card,
    .secret-poetry-box,
    .rose-poster-wrapper,
    .minimal-poetry-screen,
    .quiet-proposal-screen,
    .proposal-box,
    .heartbeat-container,
    .envelope-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 35px 16px !important;
        border-radius: 24px !important;
        box-sizing: border-box;
    }

    .glowing-moon {
        width: 95px;
        height: 95px;
        margin-bottom: 25px;
    }

    .symbolic-presence-box {
        width: 170px;
        height: 170px;
        margin-bottom: 25px;
    }

    .symbolic-rose-glow {
        font-size: 3.5rem;
    }

    .b-1 { top: 5px; left: 5px; }
    .b-2 { bottom: 5px; right: 5px; }

    .photo-frame-container { 
        width: 180px; 
        height: 180px;
        margin-bottom: 25px;
    }

    .rose-corner-decor {
        font-size: 1.6rem;
    }

    .rose-line {
        font-size: clamp(1.3rem, 4.5vw, 1.9rem);
        min-height: 38px;
    }

    .rose-line.highlight-heart {
        font-size: clamp(1.5rem, 5vw, 2.1rem);
    }

    .proposal-actions { 
        flex-direction: column; 
        gap: 15px; 
        width: 100%;
        overflow: hidden;
    }

    .btn-yes, .btn-no {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .letter-paper { 
        font-size: 1.35rem; 
        padding: 25px 16px;
    }

    .envelope {
        padding: 30px 16px;
    }

    .modal-card {
        padding: 30px 18px;
        max-width: 92vw;
        border-radius: 22px;
    }

    .modal-title {
        font-size: 1.7rem;
    }

    .modal-heart {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-title { 
        font-size: 1.85rem; 
    }

    .section-title { 
        font-size: 1.65rem; 
    }

    .urdu-text { 
        font-size: 1.35rem; 
        line-height: 2;
    }

    .urdu-subtext { 
        font-size: 1.15rem; 
    }

    .countdown-day-ticker {
        font-size: 2rem;
        min-height: 60px;
    }

    .funny-clock-anim {
        font-size: 3.5rem;
    }
}
