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

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Body no-scroll when modal is active */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Loading Modal - Glassmorphism */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 36px 36px 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 460px;
    width: 90%;
    box-sizing: border-box;
}

.loading-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 3.2vw, 1.65rem);
    color: #333;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: break-word;
}

.loading-subtitle {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: #555;
    font-style: italic;
    margin-bottom: 30px;
}

.loading-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #ffc107, #d4af37);
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-percentage {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
}

/* Loading buttons hidden — modal is now a pure auto-loader */
.modal-actions,
.start-btn,
.reset-btn {
    display: none !important;
}

@keyframes spin-reset {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

body {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    font-family: 'Lora', serif;
    background-color: #f5f5f5;
    color: #ccc;
    /* Default initial color */
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fondo.webp');
    background-repeat: repeat;
    pointer-events: none;
    z-index: 20;
    /* Above columns (10) but below header (100) and modals */
    mix-blend-mode: multiply;
    opacity: 0.6;
    /* Balanced for texture without over-darkening */
}

.story-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

/* Left Column: Text */
.text-column {
    padding: 0 5vw;
    /* Removed top padding, using spacer instead */
    background-color: #fff;
    min-height: 100vh;
}

.story-header {
    text-align: center;
    margin-bottom: 10vh;
    font-family: 'Cinzel', serif;
    color: #ccc;
}

.story-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.text-block {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 5rem;
    color: #d3d3d3;
    /* Light gray start */
    opacity: 0;
    /* Hidden initially */
    transform: translateY(20px);
    /* Slight offset for reveal */
}

/* Right Column: Images */
.image-column {
    position: relative;
    height: 100vh;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: sticky;
    top: 0;
}

.image-wrapper {
    position: relative;
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-image,
#animation-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
}

#static-last-image {
    z-index: 5;
    transform-origin: center center;
    will-change: transform, opacity;
}

#animation-canvas {
    z-index: 10;
    transform-origin: center center;
    will-change: transform, opacity;
}

/* Fixed Header & Progress */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    /* Increased slightly to give breathing room */
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* Stack logically, though absolute positioning handles the bar */
}

.header-progress-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 8px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
    background-color: #d4af37;
    z-index: 5;
    pointer-events: none;
}

.header-title {
    position: relative;
    z-index: 2;
    /* On top of progress fill */
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #333;
    letter-spacing: 0.1em;
    margin: 0;
    /* Removed padding-bottom to center vertically better */
}

.page-markers {
    position: absolute;
    bottom: 0;
    /* Align to bottom, same as progress fill */
    left: 0;
    width: 100%;
    height: 8px;
    /* Match progress fill height */
    z-index: 3;
    pointer-events: none;
    /* Let clicks pass through if needed, but we want markers clickable */
}

/* Achievement Counter (Floating Action Button) */
.achievement-counter {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background-color: #ffc107;
    /* Amber/Yellow base */
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Above everything */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.15);
    /* Drop shadow */
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-counter:hover {
    transform: scale(1.05);
}

.achievement-counter.bump {
    animation: bump-counter 0.3s ease-out;
}

.achievement-counter .star-icon {
    width: 24px;
    height: 24px;
    color: #333;
    margin-bottom: -2px;
    /* Pull closer to number */
}

#achievement-count {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    line-height: 1;
}

@keyframes bump-counter {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

/* Flying Star Animation Element */
.flying-star {
    position: fixed;
    width: 20px;
    height: 20px;
    color: #ffc107;
    z-index: 10001;
    /* Above even the counter */
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.8));
}

.spark {
    position: fixed;
    width: 4px;
    height: 4px;
    background-color: #ffc107;
    border-radius: 50%;
    z-index: 10002;
    pointer-events: none;
}

/* Achievement Modal */
.achievement-modal {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    position: fixed;
    inset: 0;
    margin: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
}

.achievement-modal[open] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.achievement-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 32px 36px 22px 36px;
    max-width: 600px;
    width: 90%;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    margin: auto;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 30px rgba(201, 168, 76, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Carousel */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.carousel-track {
    flex: 1;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    animation: fadeIn 0.3s ease-in;
}

.carousel-item.active {
    display: flex;
}

.carousel-item.locked {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.carousel-item h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.carousel-item p {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    max-width: 500px;
}

.lock-icon {
    width: 60px;
    height: 60px;
    background-color: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.unlock-requirement {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

.carousel-nav {
    background: rgba(212, 175, 55, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: rgba(212, 175, 55, 0.4);
    transform: scale(1.1);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.carousel-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.indicator.active {
    background: #ffc107;
    transform: scale(1.2);
}

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

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


/* Individual marker lines */
.page-marker {
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: rgba(0, 0, 0, 0.4);
    /* Slightly darker for visibility */
    cursor: pointer;
    pointer-events: auto;
    /* Re-enable pointer events for markers */
    transition: background-color 0.2s, opacity 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    /* Hidden by default */
    transform: scaleY(0);
    /* Start collapsed */
    transform-origin: bottom;
    /* Grow from bottom */
}

.page-marker.revealed {
    opacity: 1;
    /* Revealed when progress passes */
    transform: scaleY(1);
    /* Grow to full height */
}

.page-marker:hover {
    background-color: rgba(0, 0, 0, 0.8);
    width: 4px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid #ccc;
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: #ccc;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

.arrow {
    width: 15px;
    height: 15px;
    border-right: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    transform: rotate(45deg);
    animation: scrollArrow 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 25px;
        opacity: 0;
    }
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ── Scroll Continue Prompt (Contemplation Zone / Animation Inviter) ── */
#complete-reveal-spacer {
    min-height: 52vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    position: relative;
    padding: 3rem 1.5rem 4.5rem;
    box-sizing: border-box;
}

.scroll-continue-prompt {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    z-index: 15;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: scrollPromptFloat 2.4s ease-in-out infinite;
    text-decoration: none;
}

.scroll-continue-prompt:hover {
    transform: translateY(3px) scale(1.03);
}

.scroll-continue-prompt:active {
    transform: translateY(6px) scale(0.98);
}

.scroll-prompt-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0) 70%);
    animation: goldPulseAura 2s infinite ease-out;
    pointer-events: none;
}

.scroll-prompt-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.4rem;
    background: linear-gradient(135deg, rgba(16, 12, 26, 0.9), rgba(30, 20, 44, 0.95));
    border: 1px solid rgba(212, 175, 55, 0.65);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(212, 175, 55, 0.22);
    color: #f7eed2;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.scroll-prompt-sparkle {
    color: #ffd700;
    font-size: 1rem;
    display: inline-block;
    animation: sparkleRotate 3s infinite linear;
}

.scroll-prompt-text {
    background: linear-gradient(135deg, #ffffff 30%, #f3d078 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scroll-prompt-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #ffd700;
}

.scroll-prompt-arrows svg {
    width: 100%;
    height: 100%;
    animation: arrowBounceDown 1.4s ease-in-out infinite;
}

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

@keyframes arrowBounceDown {
    0%, 100% {
        transform: translateY(-2px);
        opacity: 0.7;
    }
    50% {
        transform: translateY(4px);
        opacity: 1;
    }
}

@keyframes goldPulseAura {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes sparkleRotate {
    0% {
        transform: rotate(0deg) scale(0.9);
    }
    50% {
        transform: rotate(180deg) scale(1.15);
    }
    100% {
        transform: rotate(360deg) scale(0.9);
    }
}

/* Footer Reveal Styling */
.reveal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background-color: #1a1a1a;
    color: #fff;
    z-index: -1;
    /* Behind content */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5vw;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    width: 100%;
    max-width: 1280px;
    gap: 2.8rem;
    font-family: 'Lora', serif;
}

.footer-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-col h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem !important;
    white-space: nowrap !important;
    margin-bottom: 0.8rem;
    color: #d4af37;
    letter-spacing: 0.03em;
}

.footer-col p {
    font-size: 0.98rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    color: #ccc;
}

.footer-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: #e6ca65;
    padding: 10px 20px;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: fit-content;
}

.footer-reset-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.5s ease;
}

.footer-reset-btn:hover {
    background: rgba(212, 175, 55, 0.28);
    border-color: #d4af37;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}

.footer-reset-btn:hover svg {
    transform: rotate(-180deg);
}

.footer-reset-btn:active {
    transform: translateY(0) scale(0.96);
}

.footer-reset-btn.clicked svg {
    animation: spin-reset 0.5s ease;
}

.footer-link,
.amazon-btn {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    position: relative;
    /* For pseudo-element */
    padding-bottom: 5px;
    width: fit-content;
    transition: color 0.3s;
}

/* Specific styling for the text link to have the dot-to-line effect */
.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    /* Start as a dot */
    height: 4px;
    /* Dot height */
    background-color: #d4af37;
    border-radius: 50%;
    /* Make it round */
    transition: width 0.3s ease, border-radius 0.3s ease, height 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
    /* Expand to full width */
    height: 1px;
    /* become a line */
    border-radius: 0;
    /* Remove roundness */
}

.footer-link:hover {
    color: #d4af37;
}

.amazon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #d4af37;
    color: #000;
    min-height: 44px;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.amazon-btn:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Ensure main content pushes up to reveal footer */
.story-container {
    margin-bottom: 50vh;
    /* Matches footer height */
    position: relative;
    z-index: 10;
    background-color: transparent;
    /* Individual columns handle bg, ensuring cover */
}

/* Ensure columns cover the footer completely */
.text-column,
.image-column {
    background-color: #fff;
    /* Enforce opacity */
}

.image-column {
    background-color: #f0f0f0;
}

/* --- Responsive & Mobile Improvements --- */

/* Rotate Device Icon */
.rotate-device-icon {
    position: fixed;
    top: 82px;
    right: 14px;
    z-index: 99999;
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 15, 0.88);
    border: 1px solid rgba(201, 168, 76, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 12px rgba(201, 168, 76, 0.25);
    pointer-events: none;
    opacity: 0;
}

.rotate-device-icon svg {
    width: 20px;
    height: 20px;
    color: #e8c96a;
    animation: rotateIcon 2.5s infinite ease-in-out;
    flex-shrink: 0;
}

.rotate-device-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #f5f0e8;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes rotateIcon {
    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-90deg);
    }
}

@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(-5px); }
    15%  { opacity: 1; transform: translateY(0); }
    85%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-5px); pointer-events: none; }
}

/* =====================================================
   MOBILE PORTRAIT — single-column layout
   Image pane sits at top (fixed height), text scrolls below
   ===================================================== */
@media (max-width: 768px) and (orientation: portrait), (max-width: 600px) {

    /* Show rotate hint */
    .rotate-device-icon {
        display: flex;
        animation: fadeInOut 7s ease forwards;
    }

    /* Fixed header: strictly sticky with clear styling */
    .fixed-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 56px;
        background-color: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fixed-header.compact {
        height: 56px !important;
        background-color: rgba(255, 255, 255, 0.96) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }

    .header-title,
    .fixed-header.compact .header-title {
        opacity: 1 !important;
        transform: none !important;
        font-size: 1.15rem;
        pointer-events: auto;
    }

    /* Switch from 2-col grid to single column */
    .story-container {
        display: flex;
        flex-direction: column-reverse; /* image on top, text below */
        margin-bottom: 0;
        position: relative;
        z-index: 5;
    }

    /* Image pane: fixed at top of viewport below sticky header */
    .image-column {
        position: fixed !important;
        top: 56px;           /* exactly below sticky header */
        left: 0;
        width: 100%;
        height: 40vh;        /* enough to see the artwork */
        z-index: 9;          /* above text, below header */
        background-color: #f0f0f0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    }

    .image-wrapper {
        width: 100%;
        height: 100%;
    }

    /* Story container has 0 bottom margin on mobile — footer flows naturally */
    .story-container {
        margin-bottom: 0 !important;
    }

    /* Footer in mobile: flows naturally below story content without clipping */
    .reveal-footer {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        z-index: 20 !important;
        padding: 3.5rem 1.5rem 6.5rem !important;
        background-color: #1a1a1a !important;
        clear: both !important;
        display: block !important;
    }

    .footer-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }

    /* Story images and canvas fill the pane */
    .story-image,
    #animation-canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }

    /* Push text below the fixed image pane */
    .text-column {
        margin-top: calc(56px + 40vh); /* header + image pane */
        padding: 0 4vw;
        min-height: 100vh;
        position: relative;
    }

    /* Gradient fade mask: makes text fade out smoothly at the top edge below the image */
    .text-column::before {
        content: '';
        position: fixed;
        top: calc(56px + 40vh - 1px);
        left: 0;
        width: 100%;
        height: 100px;
        background: linear-gradient(to bottom,
            #ffffff 0%,
            rgba(255, 255, 255, 0.98) 20%,
            rgba(255, 255, 255, 0.85) 45%,
            rgba(255, 255, 255, 0.4) 75%,
            rgba(255, 255, 255, 0) 100%
        );
        pointer-events: none;
        z-index: 15 !important;
    }

    /* Reduce first spacer so story starts sooner */
    .text-column > .spacer:first-child {
        height: 4vh !important;
    }

    /* Shrink story header on mobile */
    .story-header h1 { font-size: 1.8rem; }
    .story-header h2 { font-size: 1rem; }

    /* Smaller body text on mobile */
    .text-block {
        font-size: 1rem;
        margin-bottom: 3rem;
    }

    /* Footer single column */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Achievement counter smaller & repositioned */
    .achievement-counter {
        width: 54px;
        height: 54px;
        bottom: 70px;
        right: 16px;
    }
    #achievement-count { font-size: 1rem; }
    .achievement-counter .star-icon { width: 18px; height: 18px; }

    /* Loading modal compact */
    .loading-content {
        padding: 26px 20px 22px;
        max-width: 92%;
        width: 340px;
    }
    .loading-title {
        font-size: clamp(1.05rem, 4.5vw, 1.3rem);
        letter-spacing: 0.05em;
    }
    /* Scroll continue prompt on mobile */
    .scroll-continue-prompt {
        width: 100%;
        max-width: 320px;
    }
    .scroll-prompt-content {
        padding: 0.65rem 1rem;
        font-size: 0.78rem;
        justify-content: center;
    }

    /* Achievement modal: perfectly floating in center with 2% size boost */
    .achievement-modal[open] {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .modal-content {
        width: 92%;
        max-width: 94vw;
        padding: 28px 24px 20px 24px;
        transform: scale(1.02);
        margin: auto;
    }
}

/* Compact Header on Scroll (Landscape Mobile Only) */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
    .fixed-header {
        transition: height 0.3s ease, background-color 0.3s ease, border-bottom 0.3s ease;
    }

    .fixed-header.compact {
        height: 10px;
        /* Only show the progress bar height */
        background-color: transparent;
        border-bottom: none;
        box-shadow: none;
    }

    .header-title {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .fixed-header.compact .header-title {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }

    /* Adjust page markers specific for compact view if needed */
    .fixed-header.compact .page-markers::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.2);
        z-index: -1;
    }
}

/* Landscape Mobile & Short Viewports: Ensure footer flows naturally, never cuts off, and columns stay inline */
@media (max-width: 1050px) and (orientation: landscape), (max-height: 650px) {
    .story-container {
        margin-bottom: 0 !important;
    }

    .reveal-footer {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        z-index: 20 !important;
        padding: 2.2rem 4vw 7rem !important;
        background-color: #1a1a1a !important;
        clear: both !important;
        display: block !important;
        overflow-y: visible !important;
    }

    .footer-content {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        gap: 1.8rem !important;
        align-items: flex-start !important;
        max-width: 1100px !important;
        margin: 0 auto !important;
    }

    .footer-col.artwork-ficha-col {
        transform: translateY(-16px) !important;
    }

    .footer-col h3 {
        font-size: 1.15rem !important;
        white-space: nowrap !important;
        margin-bottom: 0.45rem !important;
    }

    .footer-col p {
        font-size: 0.82rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.5rem !important;
    }

    .amazon-btn {
        font-size: 0.78rem !important;
        padding: 8px 14px !important;
        white-space: nowrap !important;
    }

    .story-nav-bar {
        bottom: 12px !important;
        left: 12px !important;
        transform: scale(0.9) !important;
        transform-origin: bottom left !important;
    }

    .stars-counter {
        bottom: 12px !important;
        right: 12px !important;
        transform: scale(0.9) !important;
        transform-origin: bottom right !important;
    }
}

/* =====================================================
   STORY NAVIGATION BAR (Bottom-left floating)
   ===================================================== */
.story-nav-bar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #444;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.story-nav-btn svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.story-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
    color: #c9a84c;
    border-color: rgba(201, 168, 76, 0.4);
}

.story-nav-btn.prev:hover svg {
    transform: translateX(-2px);
}

.story-nav-btn.next:hover svg {
    transform: translateX(2px);
}

.back-to-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    height: 38px;
    padding: 0 16px 0 12px;
    text-decoration: none;
    color: #333;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.back-to-menu svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.back-to-menu:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
    color: #c9a84c;
    border-color: rgba(201, 168, 76, 0.4);
}

.back-to-menu:hover svg {
    transform: translateX(-3px);
}

/* Modal Reset Progress Button */
.modal-reset-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 24px;
    color: #666;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-reset-btn:hover {
    background: rgba(201, 168, 76, 0.12);
    border-color: #c9a84c;
    color: #8c7028;
    transform: translateY(-1px);
}

.modal-reset-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.4s ease;
}

.modal-reset-btn:hover svg {
    transform: rotate(-180deg);
}

.modal-reset-btn.clicked svg,
.reset-btn.clicked svg {
    animation: spin-reset 0.5s ease;
}

@media (max-width: 768px) {
    .story-nav-bar {
        bottom: 16px;
        left: 16px;
        gap: 6px;
    }
    .back-to-menu span { display: none; }
    .back-to-menu { padding: 0; width: 38px; justify-content: center; border-radius: 50%; }
}

/* =====================================================
   RESPONSIVE LANDSCAPE & SHORT SCREENS (Mobile Horizontal)
   ===================================================== */
@media (max-height: 560px) {
    .achievement-modal {
        overflow: hidden;
    }

    .achievement-modal[open] {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        padding: 16px 24px 12px 24px;
        margin: auto;
        max-height: 94dvh;
        border-radius: 14px;
        max-width: 520px;
        width: 92%;
        transform: scale(1.02);
    }

    .modal-close {
        top: 6px;
        right: 6px;
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }

    .carousel-container {
        padding: 0;
        gap: 10px;
    }

    .carousel-track {
        min-height: 100px;
    }

    .carousel-item {
        gap: 6px;
    }

    .carousel-item h3 {
        font-size: 1.05rem;
    }

    .carousel-item p {
        font-size: 0.85rem;
        line-height: 1.35;
        max-width: 400px;
    }

    .lock-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .unlock-requirement {
        font-size: 0.78rem;
    }

    .carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }

    .carousel-indicators {
        margin-top: 6px;
        gap: 6px;
    }

    .indicator {
        width: 6px;
        height: 6px;
    }

    .modal-reset-container {
        margin-top: 8px;
        padding-top: 6px;
    }

    .modal-reset-btn {
        padding: 4px 12px;
        font-size: 0.65rem;
    }

    /* Loading modal in landscape mode */
    .loading-content {
        padding: 16px 24px;
        max-width: 420px;
        border-radius: 14px;
    }

    .loading-title {
        font-size: 1.2rem;
        letter-spacing: 0.06em;
        margin-bottom: 4px;
    }

    .loading-subtitle {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .loading-percentage {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .start-btn {
        padding: 8px 24px;
        font-size: 0.82rem;
    }
}

/* =====================================================
   ARTWORK TECHNICAL SHEET (Ficha Técnica de la Obra)
   ===================================================== */
.artwork-technical-sheet {
    background: #ffffff;
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 18px;
    padding: 1.8rem 2.2rem;
    margin: 0 auto 2.2rem;
    max-width: 440px;
    width: 92%;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08), 0 0 20px rgba(201, 168, 76, 0.12);
    text-align: left;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.artwork-technical-sheet:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 168, 76, 0.75);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 25px rgba(201, 168, 76, 0.2);
}

.sheet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8c7028;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.35);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    max-width: 100%;
}

.sheet-title {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.03em;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.sheet-artist {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.88rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1.1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sheet-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sheet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding: 2px 0;
}

.sheet-label {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
}

.sheet-val {
    font-family: 'Lora', Georgia, serif;
    color: #222;
    font-weight: 600;
    text-align: right;
}

/* Footer Artwork Ficha Column - Elevated to avoid floating nav buttons */
.footer-col.artwork-ficha-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transform: translateY(-20px);
    padding-bottom: 1.5rem;
}

.footer-col.artwork-ficha-col h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem !important;
    white-space: nowrap !important;
    color: #d4af37;
    margin-bottom: 0.6rem;
    letter-spacing: 0.03em;
}

.footer-col.artwork-ficha-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #ccc;
}

.footer-col.artwork-ficha-col ul strong {
    color: #e8c96a;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 4px;
}

/* Universal enforcement: pills, badges and action buttons always strictly inline without wrapping */
.sheet-badge,
.sheet-title-badge,
.story-badge,
.footer-link,
.amazon-btn,
.footer-reset-btn,
.cinematica-btn,
.scroll-continue-prompt,
.nav-cuentos-pill {
    white-space: nowrap !important;
}

/* ============================================================
   INTRO LOADER SCREEN & SECRET VIDEO REWARD
   ============================================================ */

/* ── Intro Loader Overlay ── */
.intro-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: radial-gradient(circle at center, #15141b 0%, #08080a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 1;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-loader-overlay.fade-out {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}

.intro-loader-container {
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-align: center;
    animation: introContainerEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes introContainerEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.intro-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 576 / 392;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
}

.intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.intro-loader-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.intro-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #c5a059;
    margin: 0;
}

.intro-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #f7e7ce;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.intro-progress-bar-wrap {
    width: 100%;
    max-width: 320px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
    margin: 0.6rem 0;
}

.intro-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #c5a059, #f7e7ce);
    transition: width 0.15s linear;
}

.skip-intro-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #e6c875;
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.55rem 1.4rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.skip-intro-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.skip-intro-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #e6c875;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.skip-intro-btn:hover svg {
    transform: translateX(3px);
}

/* ── Secret Reward Bar (in Progress Hub) ── */
.secret-reward-bar {
    width: 100%;
    max-width: 600px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-sizing: border-box;
}

.secret-reward-bar.locked {
    background: rgba(20, 20, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secret-reward-bar.locked:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(25, 25, 32, 0.85);
}

.secret-reward-bar.unlocked {
    background: linear-gradient(135deg, rgba(30, 26, 18, 0.95), rgba(45, 38, 20, 0.95));
    border: 1px solid rgba(230, 200, 117, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.25), inset 0 0 15px rgba(212, 175, 55, 0.1);
    animation: unlockedPulse 3s infinite alternate ease-in-out;
}

@keyframes unlockedPulse {
    0% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
    100% { box-shadow: 0 0 30px rgba(230, 200, 117, 0.45); }
}

.secret-reward-bar.locked .reward-sparkle-icon { display: none; }
.secret-reward-bar.locked .reward-lock-icon { display: inline-block; font-size: 1.2rem; }

.secret-reward-bar.unlocked .reward-lock-icon { display: none; }
.secret-reward-bar.unlocked .reward-sparkle-icon { display: inline-block; font-size: 1.3rem; animation: spinSparkle 6s linear infinite; }

@keyframes spinSparkle {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.reward-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.reward-title {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #f7e7ce;
}

.secret-reward-bar.unlocked .reward-title {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.reward-status {
    font-size: 0.78rem;
    color: #999;
    margin-top: 2px;
}

.secret-reward-bar.unlocked .reward-status {
    color: #e6c875;
}

.reward-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.secret-reward-bar.locked .reward-action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}

.secret-reward-bar.unlocked .reward-action-btn {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #0d0d11;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.secret-reward-bar.unlocked:hover .reward-action-btn {
    transform: scale(1.05);
    background: linear-gradient(135deg, #f7e7ce, #d4af37);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.6);
}

.reward-action-btn svg {
    width: 12px;
    height: 12px;
}

/* ── Secret Complete Video Modal ── */
.secret-video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100010;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.secret-video-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.secret-video-modal-card {
    background: #111016;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    max-width: 820px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.secret-video-modal-overlay.open .secret-video-modal-card {
    transform: translateY(0) scale(1);
}

.secret-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.secret-video-title-wrap h3 {
    margin: 0.2rem 0 0;
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #f7e7ce;
}

.secret-badge {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    color: #d4af37;
    text-transform: uppercase;
    font-weight: 700;
}

.secret-video-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.secret-video-close:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #fff;
}

.secret-video-player-wrap {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 1152 / 784;
}

.full-reward-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.secret-video-caption {
    padding: 1rem 1.4rem 1.3rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.secret-video-caption p {
    margin: 0 0 0.4rem;
    color: #e6c875;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
}

.secret-video-caption span {
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 640px) {
    .intro-title {
        font-size: 1.25rem;
    }
    .intro-loader-container {
        gap: 0.9rem;
    }
    .secret-reward-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .reward-action-btn {
        width: 100%;
        justify-content: center;
    }
}