:root {
    --bg-dark: #0a0a0f;
    --bg-chapter: #0e0e16;
    --surface: #161622;
    --surface-light: #1e1e2e;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dim: #8a7434;
    --text-primary: #e8e6e3;
    --text-secondary: #9e9bab;
    --text-muted: #5c5a6e;
    --accent: #c9a84c;
    --glow: rgba(201, 168, 76, 0.15);
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
    z-index: 9999;
    transition: width 0.1s linear;
}

.floating-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.floating-nav .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid var(--gold-dim);
    margin-bottom: 0.5rem;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.dot.active,
.dot:hover {
    background: var(--gold);
    border-color: var(--gold-light);
    box-shadow: 0 0 12px var(--glow);
}

.dot::after {
    content: attr(data-label);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gold);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.dot:hover::after {
    opacity: 1;
}

.chapter {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

.chapter-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, var(--surface) 0%, var(--bg-dark) 70%);
    z-index: 0;
}

.chapter-bg-2 {
    background: radial-gradient(ellipse at 30% 50%, rgba(201,168,76,0.05) 0%, var(--bg-dark) 60%);
}

.chapter-bg-3 {
    background: radial-gradient(ellipse at 70% 40%, rgba(201,168,76,0.04) 0%, var(--bg-dark) 60%);
}

.chapter-bg-4 {
    background: radial-gradient(ellipse at 50% 60%, rgba(201,168,76,0.06) 0%, var(--bg-dark) 50%);
}

.chapter-bg-5 {
    background: radial-gradient(ellipse at 40% 30%, rgba(201,168,76,0.03) 0%, var(--bg-dark) 60%);
}

.chapter-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 4rem 2rem;
}

.chapter-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--gold);
    margin-bottom: 2rem;
}

.chapter-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 0 60px var(--glow);
    border: 2px solid var(--gold-dim);
}

.chapter-title {
    font-size: 3.5rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chapter-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.9;
}

.chapter-text-secondary {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    font-style: italic;
}

.story-divider {
    width: 60px;
    height: 1px;
    background: var(--gold-dim);
    margin: 2rem auto;
}

.btn-google-play {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s;
}

.btn-google-play:hover {
    background: var(--gold);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--glow);
}

.btn-google-play small {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.btn-google-play strong {
    display: block;
    font-size: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--gold-dim);
    border-bottom: 2px solid var(--gold-dim);
    transform: rotate(45deg);
    margin: 0.75rem auto 0;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
    50% { transform: rotate(45deg) translateY(8px); opacity: 0.5; }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--surface-light);
    transition: transform 0.4s, box-shadow 0.4s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 40px var(--glow);
}

.gallery-item img {
    width: 100%;
    display: block;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,15,0.6), transparent);
    pointer-events: none;
}

.powers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.power-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--surface-light);
    transition: transform 0.3s, border-color 0.3s;
}

.power-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dim);
}

.power-glyph {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.power-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--gold-light);
}

.power-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.faq-list {
    max-width: 650px;
    margin: 2rem auto 0;
    text-align: left;
}

.faq-item {
    border-bottom: 1px solid var(--surface-light);
}

.faq-q {
    width: 100%;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
}

.faq-arrow {
    color: var(--gold);
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.open .faq-arrow {
    transform: rotate(90deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.open .faq-a {
    max-height: 200px;
}

.faq-a p {
    padding-bottom: 1.25rem;
    color: var(--text-secondary);
}

.faq-a a {
    color: var(--gold);
}

.epilogue {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-dark);
    border-top: 1px solid var(--surface-light);
}

.epilogue-content {
    max-width: 600px;
    margin: 0 auto;
}

.epilogue-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--gold-dim);
}

.epilogue h3 {
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.epilogue-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.epilogue-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.epilogue-links a:hover {
    color: var(--gold);
}

.epilogue-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.fade-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .floating-nav {
        display: none;
    }

    .chapter-title {
        font-size: 2.2rem;
    }

    .powers-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
