:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-roman: 'Cinzel', serif;

    --color-gold: #C5A059;
    --color-gold-light: #E5C585;
    --color-gold-dark: #8A6E30;
    --color-text-primary: #333333;
    --color-text-secondary: #666666;
    --color-white: #FFFFFF;
    --color-bg-card: rgba(255, 255, 255, 0.95);

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(197, 160, 89, 0.2);

    --radius-card: 24px;
    --radius-btn: 12px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-animation,
.overlay {
    display: none;
    /* Removed as we use a static image now */
}

.quiz-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    z-index: 10;
}

.content-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-card);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

/* Typography */
h1,
h2 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    margin-bottom: 24px;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-white);
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
    background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Options Grid */
.options-grid,
.options-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.options-grid {
    grid-template-columns: 1fr;
    /* Stacked on mobile, maybe 2 cols on desktop if needed */
}

.option-card {
    background: var(--color-white);
    border: 1px solid #E0E0E0;
    border-radius: var(--radius-btn);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.option-card:hover {
    border-color: var(--color-gold);
    background: rgba(197, 160, 89, 0.05);
    transform: translateX(5px);
}

.option-card .icon {
    font-size: 1.5rem;
}

.option-card .text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: #E0E0E0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-gold);
    width: 0%;
    transition: width 0.5s ease;
}

.step-indicator {
    display: block;
    font-size: 0.9rem;
    color: var(--color-gold);
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.stage {
    animation: fadeIn 0.6s ease-out forwards;
}

.fadeOutLeft {
    animation: fadeOutLeft 0.6s ease-out forwards;
}


.hidden {
    display: none;
}

/* Timer Badge */
.timer-badge {
    background: rgba(197, 160, 89, 0.2);
    color: var(--color-gold-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--color-gold);
}

/* Audio Player Simulation */
.audio-player-sim {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    border: 1px solid #e0e0e0;
}

.audio-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-gold);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.play-btn {
    width: 40px;
    height: 40px;
    background: var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.play-triangle {
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    margin-left: 3px;
}

.pause-bars {
    display: flex;
    gap: 3px;
}

.pause-bars::before,
.pause-bars::after {
    content: '';
    width: 3px;
    height: 14px;
    background: white;
}

.wave-bar {
    flex-grow: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
}

.time {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

/* Responsive */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
        /* Keep stacked for cleaner look, or 1fr 1fr for grid */
    }

    h1 {
        font-size: 3rem;
    }
}

/* Animated Emojis */
.animated-emoji {
    font-size: 4rem;
    display: block;
    margin: 0 auto 20px;
    animation: float 3s ease-in-out infinite;
}

.pulse-emoji {
    animation: pulse 2s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(197, 160, 89, 0.6);
    }

    100% {
        box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
    }
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    /* Rectangular with rounded corners */
    margin: 0 auto 24px;
    display: block;
    animation: glow 3s infinite ease-in-out;
    border: 4px solid var(--color-gold);
}

.scroll-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 24px;
    display: block;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.book-scene {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    margin-bottom: 24px;
}

.book {
    position: relative;
    width: 240px;
    height: 340px;
    transform-style: preserve-3d;
    transform: rotateX(20deg) rotateY(0deg);
    transition: transform 1s;
    animation: floatBook 6s ease-in-out infinite;
}

.front-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3e2b1e 0%, #5a3a2a 100%);
    border-radius: 4px 10px 10px 4px;
    transform-origin: left;
    transform: rotateY(0deg);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.5), 5px 5px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid #8A6E30;
    animation: openBook 3s ease-in-out forwards;
    animation-delay: 0.9s;
}

.cross-icon {
    position: relative;
    z-index: 20;
    pointer-events: none;
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cross-vertical {
    position: absolute;
    width: 8px;
    height: 60px;
    background: linear-gradient(to bottom, #F9C846, #8A6E30);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cross-horizontal {
    position: absolute;
    width: 40px;
    height: 8px;
    background: linear-gradient(to right, #F9C846, #8A6E30);
    border-radius: 2px;
    top: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .cross-icon {
        width: 35px;
        height: 50px;
    }

    .cross-vertical {
        width: 5px;
        height: 35px;
    }

    .cross-horizontal {
        width: 22px;
        height: 5px;
        top: 10px;
    }

    .book-scene {
        height: 220px;
        margin-bottom: 15px;
    }

    .book {
        width: 140px;
        height: 200px;
    }

    .front-cover {
        width: 140px;
        height: 200px;
    }

    .pages {
        width: 140px !important;
        height: 200px !important;
        top: 0 !important;
        left: 0 !important;
        padding: 10px !important;
    }

    .scroll-content {
        font-size: 0.55rem !important;
        line-height: 1.1 !important;
        max-width: 100%;
        word-wrap: break-word;
    }

    .back-cover {
        width: 140px;
        height: 200px;
    }
}

.back-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #3e2b1e;
    border-radius: 4px 10px 10px 4px;
    transform: translateZ(-20px);
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
}

.pages {
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    height: 340px;
    background: #fdfbf7;
    border-radius: 2px 8px 8px 2px;
    transform: translateZ(-10px);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.pages::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent);
}

@keyframes openBook {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(-140deg);
    }
}

@keyframes floatBook {

    0%,
    100% {
        transform: rotateX(20deg) translateY(0);
    }

    50% {
        transform: rotateX(25deg) translateY(-15px);
    }
}

/* --- Stage 8: Video Page Styles --- */
.video-stage-container {
    /* background-color: #000; Removed to allow card to handle bg */
    width: 100%;
    /* Removed fixed positioning to stay in flow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content-card {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    /* Match other cards */
    text-align: center;
    color: white;
    background: #000;
    /* Dark card */
    border-radius: var(--radius-card);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
}

.video-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.video-progress-fill {
    width: 65%;
    /* Simulated progress */
    height: 100%;
    background: var(--color-gold);
    box-shadow: 0 0 10px var(--color-gold);
}

.video-headline {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 30px;
    color: white;
}

.video-headline .highlight-text {
    color: var(--color-gold);
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.5);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-thumb-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.big-play-button {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 0, 0.9);
    /* Red play button like reference */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    animation: pulse 2s infinite;
    transition: transform 0.2s;
}

.big-play-button:hover {
    transform: scale(1.1);
}

.play-icon {
    font-size: 30px;
    color: white;
    margin-left: 5px;
    /* Visual correction */
}

/* Remove old separate elements */
/* Remove the reference image background */
/* .scroll-composition { background-image: ... } removed */

.parchment-scroll {
    display: flex;
    width: 320px;
    height: 420px;
    background-image: url('blank_scroll.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 80px 50px;
    align-items: center;
    justify-content: center;
    transform: rotateX(10deg) rotateY(0deg) rotateZ(0deg);
    /* Slight tilt for 3D feel */
    filter: drop-shadow(0 20px 40px rgba(197, 160, 89, 0.4));
    /* Golden glow shadow */
    animation: float 6s ease-in-out infinite;
    position: relative;
    top: 0;
}

.cross-container,
.golden-cross {
    display: none;
}

.scroll-content {
    font-family: var(--font-roman);
    color: #4a3b2a;
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: center;
    font-weight: 700;
    opacity: 0;
    animation: fadeInText 2s ease-out forwards;
    animation-delay: 2.5s;
    /* Wait for book to open */
    word-break: break-all;

    /* Reset specific transforms as the parent scroll is already transformed */
    position: relative;
    width: 100%;
    height: auto;
    transform: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    mix-blend-mode: multiply;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elegant Timer */
.timer-text {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-gold-dark);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1rem;
    border: 1px solid var(--color-gold);
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
    font-family: var(--font-body);
}

.highlight-text {
    color: var(--color-gold-dark);
    /* Gold/Yellow */
    font-weight: 800;
}

.top-bar-progress {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.footer-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
    display: block;
}

.pulse-animation {
    animation: pulse 2s infinite;
}