/* ==========================================================================
   PRINCESS SARORA - ROYAL DISNEY ENCHANTED SCRAPBOOK
   High-End Liquid Glassmorphism & Disney Fairytale Aesthetic
   Mobile-First 60fps Ultra-Smooth Responsive Design
   ========================================================================== */

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

/* --- CSS Variables & Design Tokens --- */
:root {
    --bg-night-1: #120726;
    --bg-night-2: #210d40;
    --bg-night-3: #3b145e;
    --bg-dawn: #5a2179;
    --bg-twilight: #82388c;

    --gold-royal: #ffd166;
    --gold-bright: #ffe699;
    --gold-deep: #e09f3e;
    --gold-glow: rgba(255, 209, 102, 0.45);

    --pink-princess: #ff7597;
    --pink-soft: #ffb8d2;
    --pink-glow: rgba(255, 117, 151, 0.4);

    --lavender-dream: #d8b4e2;
    --teal-jasmine: #4dd0e1;
    --blue-cindy: #81d4fa;

    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-subtle: rgba(255, 255, 255, 0.07);
    --glass-bg-card: rgba(255, 255, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.32);
    --glass-border-gold: rgba(255, 215, 120, 0.5);
    --glass-shadow: 0 16px 36px 0 rgba(18, 7, 38, 0.35);
    --glass-blur: blur(20px);

    --polaroid-paper: #fffdf9;
    --polaroid-shadow: 0 12px 32px rgba(10, 4, 25, 0.28), 0 2px 6px rgba(10, 4, 25, 0.12);
    --polaroid-shadow-hover: 0 24px 50px rgba(10, 4, 25, 0.4), 0 0 25px rgba(255, 209, 102, 0.3);

    --font-heading: 'Marhey', 'Alexandria', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    --font-handwriting: 'Marhey', 'Caveat', cursive;
    --font-royal: 'Playfair Display', Georgia, serif;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

body {
    min-height: 100%;
    min-height: 100dvh;
    font-family: var(--font-body);
    direction: rtl;
    text-align: right;
    color: #ffffff;
    background: linear-gradient(180deg, var(--bg-night-1) 0%, var(--bg-night-2) 20%, var(--bg-night-3) 50%, var(--bg-dawn) 75%, var(--bg-twilight) 90%, var(--bg-night-1) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* --- Canvas Fairy Dust Particles --- */
#fairy-dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* --- Floating Tangled Lanterns Background --- */
.floating-lanterns-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.lantern-orb {
    position: absolute;
    width: 32px;
    height: 42px;
    background: url('../assets/images/decorations/tangled_lantern.svg') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 14px rgba(255, 179, 0, 0.75));
    opacity: 0.65;
    animation: floatLantern 18s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    bottom: -60px;
    will-change: transform, opacity;
}

.lantern-1 { left: 8%; animation-duration: 22s; animation-delay: 0s; transform: scale(0.7); }
.lantern-2 { left: 24%; animation-duration: 27s; animation-delay: 5s; transform: scale(1.1); }
.lantern-3 { left: 45%; animation-duration: 20s; animation-delay: 2s; transform: scale(0.85); }
.lantern-4 { left: 70%; animation-duration: 25s; animation-delay: 8s; transform: scale(1.2); }
.lantern-5 { left: 88%; animation-duration: 24s; animation-delay: 4s; transform: scale(0.9); }
.lantern-6 { left: 35%; animation-duration: 29s; animation-delay: 11s; transform: scale(0.65); }
.lantern-7 { left: 60%; animation-duration: 21s; animation-delay: 14s; transform: scale(1); }

@keyframes floatLantern {
    0% {
        transform: translateY(0) translateX(0) scale(var(--s, 1));
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50vh) translateX(25px) scale(var(--s, 1));
    }
    85% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-115vh) translateX(-20px) scale(var(--s, 1));
        opacity: 0;
    }
}

/* --- 1. ROYAL GATE / WAX SEAL MODAL (البوابة الملكية) --- */
.royal-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(circle at center, #2e124d 0%, #110524 85%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.9s;
}

.royal-gate-overlay.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gate-castle-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    opacity: 0.18;
    background: radial-gradient(ellipse at bottom, rgba(255, 209, 102, 0.4), transparent 70%);
    pointer-events: none;
}

.envelope-wrapper {
    perspective: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 440px;
    width: 100%;
    cursor: pointer;
}

.royal-envelope-custom {
    position: relative;
    max-width: 440px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: envelopeFloat 3.8s ease-in-out infinite;
}

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

.envelope-wrapper:hover .royal-envelope-custom,
.royal-envelope-custom:hover {
    transform: translateY(-10px) scale(1.03);
}

.royal-envelope-custom:active {
    transform: scale(0.96);
}

.envelope-custom-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 25px 45px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 25px rgba(255, 117, 151, 0.35));
    transition: filter 0.3s ease;
}

.royal-envelope-custom:hover .envelope-custom-img {
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 35px rgba(255, 209, 102, 0.5));
}

.envelope-glow-aura {
    position: absolute;
    inset: 10%;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.35) 0%, rgba(255, 117, 151, 0.25) 50%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(25px);
    animation: auraPulse 3s ease-in-out infinite alternate;
}

@keyframes auraPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0.95; }
}

.envelope-instruction {
    margin-top: 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid var(--glass-border-gold);
    padding: 24px 20px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--gold-glow);
    max-width: 460px;
    width: 100%;
}

.lock-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 209, 102, 0.2);
    border: 1px solid var(--gold-royal);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gold-bright);
    font-weight: 700;
    margin-bottom: 10px;
}

.envelope-instruction h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.passcode-hint-banner {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(255, 117, 151, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.98rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.birthday-lock-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Date Vault Input Grid */
.date-vault-grid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(18, 7, 38, 0.55);
    padding: 14px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.date-field-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.field-label {
    font-size: 0.8rem;
    color: var(--gold-bright);
    font-weight: 700;
    font-family: var(--font-body);
}

.vault-digit-input {
    width: 56px;
    height: 54px;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid var(--glass-border-gold);
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-heading);
    text-align: center;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.vault-digit-input.year-input {
    width: 86px;
}

.vault-digit-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    font-size: 1.05rem;
}

.vault-digit-input:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 16px var(--gold-glow);
}

.vault-separator {
    font-size: 1.4rem;
    color: var(--gold-bright);
    font-weight: bold;
    margin-top: 18px;
    opacity: 0.85;
    user-select: none;
}

.royal-passcode-submit {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-royal));
    border: none;
    color: #210d40;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 13px 32px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 209, 102, 0.45);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.royal-passcode-submit:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 26px rgba(255, 209, 102, 0.6);
}

.royal-passcode-submit:active {
    transform: scale(0.96);
}

.passcode-error-msg {
    min-height: 22px;
    margin-top: 6px;
    color: #ff80ab;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s;
}

.date-vault-grid.error-shake {
    border-color: #ff5252;
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.5);
    animation: shakePasscode 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.date-vault-grid.vault-unlocked {
    border-color: #69f0ae;
    box-shadow: 0 0 25px rgba(105, 240, 174, 0.6);
}

/* --- 2. LIQUID GLASS STICKY HEADER & MUSIC CONTROLS --- */
.royal-header {
    position: sticky;
    top: 12px;
    z-index: 100;
    max-width: 920px;
    margin: 12px auto 0;
    padding: 0 16px;
}

.glass-nav-pill {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.3s ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crown-icon {
    font-size: 1.5rem;
    animation: tiaraGlow 2.5s ease-in-out infinite;
}

@keyframes tiaraGlow {
    0%, 100% { filter: drop-shadow(0 0 4px var(--gold-royal)); transform: rotate(-5deg); }
    50% { filter: drop-shadow(0 0 12px var(--gold-royal)); transform: rotate(5deg); }
}

.princess-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(135deg, #ffffff, var(--gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.glass-ctrl-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.25s ease;
}

.glass-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.glass-ctrl-btn:active {
    transform: scale(0.92);
}

.glass-ctrl-btn.active {
    background: linear-gradient(135deg, var(--pink-princess), var(--gold-royal));
    border-color: #ffffff;
    box-shadow: 0 0 12px var(--pink-glow);
}

.music-spinning {
    animation: rotateVinyl 4s linear infinite;
}

@keyframes rotateVinyl {
    100% { transform: rotate(360deg); }
}

/* --- 3. HERO / WELCOME SECTION --- */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 5;
}

.hero-castle-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.3) 0%, rgba(255, 117, 151, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(20px);
}

.tiara-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-gold);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--gold-bright);
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 7vw, 3.8rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 10%, var(--gold-bright) 50%, var(--pink-soft) 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    max-width: 650px;
    line-height: 1.8;
    color: #f7e8ff;
    margin-bottom: 32px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-scroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 117, 151, 0.85), rgba(255, 209, 102, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #210d40;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: var(--font-heading);
    padding: 14px 34px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 117, 151, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.hero-scroll-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 15px 35px rgba(255, 117, 151, 0.5);
}

.hero-scroll-btn:active {
    transform: scale(0.96);
}

/* --- 4. THE SCRAPBOOK SECTION (جدار الذكريات والأيام الحلوة) --- */
.scrapbook-section {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 18px 100px;
    z-index: 5;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-block;
    color: var(--pink-soft);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.section-desc {
    color: var(--lavender-dream);
    font-size: 1.05rem;
    margin-top: 8px;
}

/* Twine / String connecting the memories */
.scrapbook-twine {
    position: absolute;
    top: 140px;
    bottom: 140px;
    left: 50%;
    width: 3px;
    background: repeating-linear-gradient(to bottom, rgba(255, 209, 102, 0.5) 0px, rgba(255, 209, 102, 0.5) 8px, transparent 8px, transparent 16px);
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0.4;
}

/* Polaroid Grid / Staggered Layout */
.polaroids-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 850px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .polaroids-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px 40px;
    }
}

/* Individual Polaroid Memory Card */
.polaroid-card {
    position: relative;
    background: var(--polaroid-paper);
    padding: 14px 14px 36px;
    border-radius: 8px;
    box-shadow: var(--polaroid-shadow);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.polaroid-card:hover,
.polaroid-card:focus {
    transform: translateY(-8px) scale(1.03) rotate(0deg) !important;
    box-shadow: var(--polaroid-shadow-hover);
    z-index: 20;
}

.polaroid-card:active {
    transform: scale(0.98) !important;
}

/* Random Playful Tilts */
.tilt-left-1 { transform: rotate(-3deg); }
.tilt-right-1 { transform: rotate(2.5deg); }
.tilt-left-2 { transform: rotate(-2deg); }
.tilt-right-2 { transform: rotate(3.2deg); }
.tilt-left-3 { transform: rotate(-2.8deg); }
.tilt-right-3 { transform: rotate(2deg); }
.tilt-left-4 { transform: rotate(-3.5deg); }
.tilt-right-4 { transform: rotate(2.8deg); }

/* The Pushpin or Paperclip at the top */
.pin-holder {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 38px;
    z-index: 10;
    pointer-events: none;
}

.clip-holder {
    position: absolute;
    top: -14px;
    right: 32px;
    width: 26px;
    height: 48px;
    z-index: 10;
    pointer-events: none;
}

.pin-holder img,
.clip-holder img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Photo Aspect Box */
.polaroid-photo-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: #e8eaf6;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
}

.polaroid-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.polaroid-card:hover .polaroid-photo-box img {
    transform: scale(1.06);
}

/* Realistic Gloss Reflection on Photo */
.polaroid-photo-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 45%, transparent 60%);
    pointer-events: none;
}

/* Handwritten Caption */
.polaroid-caption {
    margin-top: 14px;
    text-align: center;
    padding: 0 6px;
}

.polaroid-caption h3 {
    font-family: var(--font-handwriting);
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c1a3b;
    line-height: 1.4;
}

.polaroid-caption .memory-date {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #8c7199;
    margin-top: 4px;
}

/* Cute Corner Tape Sticker on some cards */
.corner-tape {
    position: absolute;
    width: 70px;
    height: 22px;
    background: rgba(255, 230, 180, 0.75);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 8;
    pointer-events: none;
}
.tape-top-left {
    top: -6px;
    left: -12px;
    transform: rotate(-35deg);
}
.tape-top-right {
    top: -6px;
    right: -12px;
    transform: rotate(35deg);
}

/* --- 5. INTERACTIVE DISNEY PRINCESS COMPANIONS (شخصيات ديزني على الجوانب) --- */
.disney-companion {
    position: fixed;
    z-index: 90;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
}

.companion-right {
    right: 12px;
}

.companion-left {
    left: 12px;
}

/* Placed on screen corners / sides */
.companion-rapunzel {
    top: 25%;
}

.companion-cinderella {
    top: 45%;
}

.companion-belle {
    top: 65%;
}

.companion-jasmine {
    top: 82%;
}

/* Companion Bubble / Avatar */
.companion-avatar-wrap {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--gold-royal);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px var(--gold-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    animation: companionFloat 3.2s ease-in-out infinite;
}

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

.companion-avatar-wrap img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.companion-avatar-wrap:hover img,
.disney-companion:active .companion-avatar-wrap img {
    transform: scale(1.15) rotate(5deg);
}

/* Tap indicator ring */
.tap-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--gold-royal);
    opacity: 0.8;
    animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.9; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Jump animation on click */
.disney-companion.jumping .companion-avatar-wrap {
    animation: princessJump 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes princessJump {
    0% { transform: scale(1) translateY(0); }
    40% { transform: scale(1.3) translateY(-25px); }
    70% { transform: scale(0.9) translateY(4px); }
    100% { transform: scale(1) translateY(0); }
}

/* Character Motivational Speech Bubble Modal / Popup */
.princess-quote-bubble {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    z-index: 500;
    max-width: 420px;
    width: 90%;
    background: rgba(33, 13, 64, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid var(--gold-royal);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px var(--gold-glow);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.princess-quote-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.quote-bubble-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 490;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quote-bubble-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.quote-char-avatar {
    width: 80px;
    height: 80px;
    margin: -60px auto 12px;
    border-radius: 50%;
    background: var(--bg-night-2);
    border: 3px solid var(--gold-royal);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-char-avatar img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.quote-char-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-bright);
    margin-bottom: 12px;
}

.quote-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 20px;
}

.quote-close-btn {
    background: linear-gradient(135deg, var(--pink-princess), var(--gold-royal));
    border: none;
    color: #210d40;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 28px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 117, 151, 0.4);
    transition: transform 0.2s ease;
}

.quote-close-btn:active {
    transform: scale(0.95);
}

/* --- 5. THE SEAMLESS ROYAL CINEMA SECTION (انسيابي وبدون بطاقات) --- */
.cinema-section {
    position: relative;
    max-width: 920px;
    margin: 60px auto 90px;
    padding: 0 16px;
    z-index: 10;
}

.cinema-header-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.cinema-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.cinema-subtitle {
    color: var(--pink-soft);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Ambient Glow behind the seamless video */
.seamless-cinema-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.cinema-ambient-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle at center, rgba(255, 117, 151, 0.4) 0%, rgba(156, 39, 176, 0.3) 45%, transparent 75%);
    filter: blur(40px);
    border-radius: 40px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    animation: ambientGlowPulse 5s ease-in-out infinite alternate;
}

@keyframes ambientGlowPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.05); opacity: 0.95; }
}

/* The Seamless, Borderless Video Frame */
.seamless-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.85), 0 0 45px rgba(255, 117, 151, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
    cursor: pointer;
    user-select: none;
}

.seamless-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000000;
}

/* Big Center Play / Pause Action Button */
.video-center-action {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.center-play-btn {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    font-size: 1.9rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(255, 209, 102, 0.4);
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.center-play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.38);
}

.center-play-btn:active {
    transform: scale(0.92);
}

.video-center-action.action-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Custom Video Controls Bar */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 24px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 65%, transparent 100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.custom-video-controls.controls-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Progress Bar / Scrubber */
.video-progress-wrap {
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 6px;
    touch-action: none;
}

.video-progress-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    position: relative;
    transition: height 0.15s ease;
}

.video-progress-wrap:hover .video-progress-bg,
.video-progress-wrap.scrubbing .video-progress-bg {
    height: 6px;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff7597, #ffd166);
    border-radius: 4px;
    position: relative;
}

.video-progress-handle {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 209, 102, 0.8);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.video-progress-wrap:hover .video-progress-handle,
.video-progress-wrap.scrubbing .video-progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

/* Controls Toolbar */
.video-controls-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v-control-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.v-control-btn:hover {
    transform: scale(1.15);
    color: var(--gold-bright);
}

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

.v-time-counter {
    font-size: 0.85rem;
    color: #e5d8ff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    font-weight: 500;
    direction: ltr;
    letter-spacing: 0.5px;
}

/* Video Progress Buffer Track */
.video-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    transition: width 0.25s ease;
    pointer-events: none;
}

/* Quick Skip Buttons */
.v-skip-btn {
    font-size: 0.78rem !important;
    font-weight: 700;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.12) !important;
    padding: 3px 7px !important;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.v-skip-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: var(--gold-bright) !important;
    border-color: var(--gold-bright) !important;
}

/* Video Loading & Buffering Spinner */
.video-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(18, 7, 38, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 120, 0.35);
    padding: 16px 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 209, 102, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-loading-spinner.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffd166;
    border-right-color: #ff7597;
    animation: videoSpinnerRotate 0.85s linear infinite;
}

@keyframes videoSpinnerRotate {
    to { transform: rotate(360deg); }
}

.spinner-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold-bright);
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Double-Tap Seek Ripples */
.seek-ripple {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.7);
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
}

.seek-ripple-left { left: 18%; }
.seek-ripple-right { right: 18%; }

.seek-ripple-icon { font-size: 1.5rem; line-height: 1; }
.seek-ripple-text { font-size: 0.72rem; font-weight: 700; color: var(--gold-bright); }

.seek-ripple.active {
    animation: seekRipplePop 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes seekRipplePop {
    0% { transform: translateY(-50%) scale(0.5); opacity: 0; }
    50% { transform: translateY(-50%) scale(1.1); opacity: 0.95; }
    100% { transform: translateY(-50%) scale(1.3); opacity: 0; }
}

/* --- 6. ROYAL FOOTER --- */
.royal-footer {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 5;
    background: linear-gradient(to top, rgba(18, 7, 38, 0.9), transparent);
}

.footer-quote {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--gold-bright);
    margin-bottom: 18px;
}

.footer-sub {
    font-size: 0.95rem;
    color: var(--pink-soft);
    margin-bottom: 24px;
}

.footer-watermark {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- 9. POLAROID LIGHTBOX MODAL (تكبير الصورة) --- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 4, 25, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-card {
    background: var(--polaroid-paper);
    padding: 16px 16px 24px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
    text-align: center;
    position: relative;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.active .lightbox-card {
    transform: scale(1);
}

/* Cartoon Character Pop-up Companion */
.lightbox-character-wrap {
    position: absolute;
    top: -55px;
    right: -25px;
    width: 105px;
    height: 105px;
    z-index: 25;
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    display: none;
}

.lightbox-character-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-modal.active .lightbox-character-wrap {
    display: block;
    animation: charPopBounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes charPopBounce {
    0% {
        transform: scale(0) rotate(-25deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.18) rotate(6deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.lightbox-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.lightbox-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-sound-wave {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    background: rgba(255, 117, 151, 0.15);
    border: 1px solid rgba(255, 117, 151, 0.35);
    padding: 6px 18px;
    border-radius: 20px;
    color: var(--pink-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.music-note-pulse {
    display: inline-block;
    animation: soundNoteBounce 1s infinite alternate ease-in-out;
}

@keyframes soundNoteBounce {
    0% { transform: scale(0.9) rotate(-10deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

.lightbox-close-btn {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 44px;
    height: 44px;
    background: var(--pink-princess);
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .disney-companion {
        transform: scale(0.85);
    }
    .companion-right {
        right: 4px;
    }
    .companion-left {
        left: 4px;
    }
    .polaroids-container {
        padding: 0 8px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .video-frame-outer {
        max-width: 290px;
        border-radius: 22px;
    }
}

