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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, serif;
    background: linear-gradient(135deg, #1b140f, #2d2218, #120f0d);
    color: #f8f1e7;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(212,175,55,0.12), transparent 25%),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.05), transparent 20%);
    pointer-events: none;
}

.container {
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 16px;
    position: relative;
    z-index: 1;
}

.intro-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, #2f241b, #120d09);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: 0.8s ease;
}

.intro-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.intro-inner {
    text-align: center;
}

.gold-ring {
    width: 90px;
    height: 90px;
    border: 2px solid #d4af37;
    border-radius: 50%;
    margin: 0 auto 16px;
    box-shadow: 0 0 30px rgba(212,175,55,0.35);
    animation: pulse 1.5s infinite;
}

.brand {
    font-size: 30px;
    color: #f3d78a;
    letter-spacing: 1px;
}

.tagline {
    color: #d9c7a2;
    margin-top: 8px;
}

@keyframes pulse {
    0% { transform: scale(0.92); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.92); opacity: 0.7; }
}

.glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 24px;
}

.hero {
    padding: 22px;
    display: grid;
    gap: 22px;
    margin-top: 14px;
}

.hero-cover-side {
    display: grid;
    gap: 14px;
}

.premium-badge {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(212,175,55,0.14);
    border: 1px solid rgba(212,175,55,0.28);
    color: #f3d78a;
    font-size: 13px;
}

.cover-wrap {
    display: flex;
    justify-content: center;
}

.ebook-cover {
    width: 220px;
    height: 305px;
    border-radius: 20px;
    background: linear-gradient(145deg, #3b2b1f, #8f6b32);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 18px 35px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #f7e7b1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cover-top-line,
.cover-bottom-line {
    width: 70%;
    height: 1px;
    background: rgba(255,236,179,0.55);
    position: absolute;
}

.cover-top-line {
    top: 30px;
}

.cover-bottom-line {
    bottom: 30px;
}

.cover-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.cover-subtitle {
    font-size: 14px;
    opacity: 0.95;
}

.hero-content h1 {
    font-size: 30px;
    margin-bottom: 12px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #e7c977;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content p {
    color: #eadfcf;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.stat-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 4px;
}

.stat-box strong {
    color: #f3d78a;
    font-size: 14px;
}

.stat-box span {
    color: #e8dbc7;
    font-size: 12px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn {
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.gold {
    background: linear-gradient(135deg, #d4af37, #f2d48b);
    color: #24170d;
    font-weight: bold;
}

.btn.dark {
    background: rgba(20,15,10,0.8);
    color: #f7ead1;
    border: 1px solid rgba(255,255,255,0.12);
}

.btn.whatsapp {
    background: #1f8f5f;
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.96;
}

.section {
    margin-top: 20px;
}

.reader-intro {
    padding: 18px;
}

.section-head {
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.section-head.compact {
    border-bottom: none;
    padding: 0;
}

.section-head h2 {
    margin-bottom: 6px;
}

.section-head p,
.section-sub {
    color: #e7dac7;
    line-height: 1.7;
    font-size: 14px;
}

.toc-list {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.toc-item {
    background: rgba(255,255,255,0.06);
    color: #f8efe3;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
}

.toc-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(212,175,55,0.15);
    color: #f3d78a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.toc-title {
    line-height: 1.5;
}

.chapter-card {
    margin-top: 18px;
    padding: 18px;
}

.chapter-head {
    margin-bottom: 12px;
}

.chapter-no {
    display: inline-block;
    color: #f1d27a;
    margin-bottom: 8px;
    font-size: 14px;
}

.chapter-head h3 {
    font-size: 22px;
}

.chapter-preview {
    line-height: 1.9;
    color: #f0e8db;
    margin-bottom: 12px;
}

.chapter-locked {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    max-height: 220px;
}

.chapter-full {
    filter: blur(8px);
    opacity: 0.55;
    pointer-events: none;
    line-height: 1.9;
    color: #fff5e6;
    background: rgba(255,255,255,0.04);
    padding: 16px;
    border-radius: 16px;
}

.chapter-locked.unlocked {
    max-height: none;
}

.chapter-locked.unlocked .chapter-full {
    filter: blur(0);
    opacity: 1;
    pointer-events: auto;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(20,12,8,0.18), rgba(20,12,8,0.92));
    z-index: 2;
}

.lock-overlay.hidden {
    display: none;
}

.lock-box {
    text-align: center;
    padding: 20px;
    width: 90%;
    max-width: 320px;
    border-radius: 18px;
    background: rgba(255,255,255,0.09);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.unlock-panel {
    margin-top: 22px;
    padding: 20px;
}

.unlock-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.unlock-header h3 {
    margin-bottom: 6px;
    color: #f3d78a;
}

.unlock-header p {
    color: #ecdcc4;
    line-height: 1.7;
}

.unlock-status-chip {
    background: rgba(180, 58, 58, 0.18);
    border: 1px solid rgba(255,120,120,0.22);
    color: #ffd2d2;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}

.unlock-status-chip.active {
    background: rgba(53, 133, 78, 0.18);
    border: 1px solid rgba(102,255,153,0.22);
    color: #d8ffe4;
}

.unlock-form-wrap {
    transition: 0.3s ease;
}

.unlock-form {
    display: grid;
    gap: 10px;
}

.unlock-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
}

.unlock-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.unlocked-user-card {
    margin-top: 6px;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: rgba(53, 133, 78, 0.16);
    border: 1px solid rgba(102,255,153,0.22);
}

.unlocked-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f8f5f, #57c58b);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
}

.unlocked-user-info {
    display: grid;
    gap: 4px;
}

.unlocked-user-info strong {
    color: #e7ffe9;
}

.unlocked-user-info span {
    color: #eef8ef;
    font-size: 14px;
}

.success-box,
.error-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
}

.success-box {
    background: rgba(53, 133, 78, 0.18);
    border: 1px solid rgba(102,255,153,0.22);
}

.error-box {
    background: rgba(180, 58, 58, 0.18);
    border: 1px solid rgba(255,120,120,0.22);
}

.hidden {
    display: none !important;
}

#confettiCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

.reveal-up {
    animation: revealUp 0.5s ease;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 290px 1fr;
        align-items: center;
        padding: 30px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .unlock-form {
        grid-template-columns: 1fr auto auto;
        align-items: center;
    }
}