:root {
  --yellow: #f5c518;
  --yellow-dark: #d4a800;
  --bg: #0f0f0f;
  --bg-2: #1a1a1a;
  --bg-3: #242424;
  --border: #2e2e2e;
  --text: #f5f5f5;
  --text-muted: #888;
  --text-dim: #444;
  --green: #4ade80;
  --red: #f87171;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 100;
}
.nav-logo img { height: 66px; width: auto; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 0.65rem 1.35rem; border-radius: 9px;
  font-weight: 700; font-size: 0.875rem; cursor: pointer;
  transition: all 0.18s; text-decoration: none !important; border: none;
}
.btn-primary { background: var(--yellow); color: #000; }
.btn-primary:hover { background: var(--yellow-dark); }
.btn-outline { border: 1px solid var(--border); color: var(--text-muted); background: transparent; }
.btn-outline:hover { border-color: #555; color: var(--text); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: 11px; }

/* ── Hero ── */
.hero { text-align: center; padding: 5rem 2rem 4rem; max-width: 680px; margin: 0 auto; }
.hero-badge {
  display: inline-block; background: rgba(245,197,24,0.1);
  border: 1px solid rgba(245,197,24,0.3); color: var(--yellow);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.35rem 0.9rem; border-radius: 20px; margin-bottom: 1.5rem;
}
.hero h1 { font-size: 3rem; font-weight: 900; line-height: 1.15; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--yellow); }
.hero p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }

/* ── Stats bar ── */
.stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 580px; margin: 0 auto; padding: 2.5rem 2rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center; gap: 1rem;
}
.stat-num { font-size: 2.25rem; font-weight: 900; color: var(--yellow); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Sections ── */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-title { font-size: 1.8rem; font-weight: 900; text-align: center; margin-bottom: 0.4rem; }
.section-sub { color: var(--text-muted); text-align: center; font-size: 0.95rem; margin-bottom: 3rem; }

/* ── Book cards ── */
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.book-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.book-card:hover { border-color: rgba(245,197,24,0.5); transform: translateY(-2px); }
.book-cover { height: 260px; overflow: hidden; background: var(--bg-3); display: flex; align-items: center; justify-content: center; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.book-cover-mock {
  background: var(--yellow); border-radius: 8px; padding: 2rem 1.5rem;
  text-align: center; width: 180px;
}
.book-cover-mock .mock-brand { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #000; margin-bottom: 0.4rem; }
.book-cover-mock .mock-title { font-size: 2rem; font-weight: 900; color: #000; line-height: 1; }
.book-cover-mock .mock-sub { font-size: 0.85rem; font-weight: 800; color: #000; margin-bottom: 0.5rem; }
.book-cover-mock .mock-year { font-size: 0.65rem; font-weight: 700; color: #333; }
.book-body { padding: 1.5rem; }
.book-badge-live {
  display: inline-block; background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.3);
  color: var(--green); font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 20px; margin-bottom: 0.6rem;
}
.book-badge-soon {
  display: inline-block; background: rgba(245,197,24,0.1); border: 1px solid rgba(245,197,24,0.3);
  color: var(--yellow); font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 20px; margin-bottom: 0.6rem;
}
.book-subject { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.4rem; }
.book-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.book-desc { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.25rem; }
.book-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Page hero (inner pages) ── */
.page-hero { padding: 3rem 2rem 2rem; max-width: 780px; margin: 0 auto; }
.back-link { font-size: 0.85rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.75rem; }
.back-link:hover { color: var(--text); text-decoration: none; }
.book-detail { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.book-detail-cover { width: 160px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.book-detail-cover img { width: 100%; }
.book-detail-cover-mock {
  width: 160px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: var(--yellow); padding: 1.5rem 1rem; text-align: center;
}
.book-detail-cover-mock .m-brand { font-size: 0.55rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #000; margin-bottom: 0.4rem; }
.book-detail-cover-mock .m-title { font-size: 1.75rem; font-weight: 900; color: #000; line-height: 1; }
.book-detail-cover-mock .m-sub { font-size: 0.75rem; font-weight: 800; color: #000; }
.book-detail-cover-mock .m-year { font-size: 0.6rem; color: #333; font-weight: 700; margin-top: 0.4rem; }
.book-detail-info h1 { font-size: 1.75rem; font-weight: 900; line-height: 1.2; margin-bottom: 0.5rem; }
.book-detail-info .tagline { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.book-bullets { list-style: none; margin-bottom: 1.25rem; }
.book-bullets li { font-size: 0.875rem; color: var(--text-muted); padding: 0.2rem 0; display: flex; gap: 0.5rem; }
.book-bullets li::before { content: "✓"; color: var(--yellow); font-weight: 700; flex-shrink: 0; }
.detail-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Features grid ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 780px; margin: 0 auto; }
.feature-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.feature-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
.feature-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.feature-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

/* ── Quiz ── */
.quiz-wrap { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; max-width: 780px; margin: 0 auto; }
.quiz-header { margin-bottom: 1.5rem; }
.quiz-header h3 { font-size: 1.2rem; font-weight: 800; }
.quiz-header p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.quiz-progress-track { background: var(--bg-3); border-radius: 4px; height: 4px; margin-bottom: 1.5rem; }
.quiz-progress-fill { background: var(--yellow); height: 4px; border-radius: 4px; transition: width 0.3s ease; }
.quiz-counter { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.quiz-q { font-size: 1.05rem; font-weight: 600; line-height: 1.5; margin-bottom: 1.25rem; }
.quiz-opts { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.25rem; }
.quiz-opt {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.85rem 1rem; cursor: pointer; transition: all 0.15s;
  font-size: 0.9rem; color: var(--text); text-align: left; width: 100%;
  font-family: inherit;
}
.quiz-opt:hover:not([disabled]) { border-color: var(--yellow); background: rgba(245,197,24,0.06); }
.quiz-opt .ltr { font-weight: 700; color: var(--text-muted); min-width: 18px; flex-shrink: 0; }
.quiz-opt.correct { border-color: var(--green); background: rgba(74,222,128,0.1); }
.quiz-opt.correct .ltr { color: var(--green); }
.quiz-opt.wrong { border-color: var(--red); background: rgba(248,113,113,0.1); }
.quiz-opt.wrong .ltr { color: var(--red); }
.quiz-opt.reveal { border-color: var(--green); background: rgba(74,222,128,0.07); }
.quiz-opt[disabled] { cursor: default; }
.quiz-exp {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 1.25rem; display: none;
}
.quiz-exp.show { display: block; }
.quiz-exp strong { color: var(--text); }
.quiz-footer { display: flex; justify-content: space-between; align-items: center; }
.quiz-score-display { font-size: 0.85rem; color: var(--text-muted); }
.quiz-results { text-align: center; padding: 2rem 1rem; }
.result-score { font-size: 3.5rem; font-weight: 900; line-height: 1; }
.result-label { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.25rem; margin-bottom: 1rem; }
.result-msg { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ── Divider ── */
hr.divider { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }
.footer-logo img { height: 30px; width: auto; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; font-size: 0.85rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }

/* ── About page ── */
.about-hero { max-width: 720px; margin: 0 auto; padding: 4rem 2rem 2rem; }
.about-hero h1 { font-size: 2.6rem; font-weight: 900; line-height: 1.15; margin-bottom: 1rem; }
.about-hero h1 span { color: var(--yellow); }
.about-lead { font-size: 1.15rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 2.5rem; max-width: 620px; }
.about-body { max-width: 720px; margin: 0 auto; padding: 0 2rem 5rem; }
.about-block { margin-bottom: 3rem; }
.about-block h2 { font-size: 1.2rem; font-weight: 800; color: var(--yellow); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.about-block p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; }
.about-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.about-val { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.about-val h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 0.35rem; }
.about-val p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ── Contact page ── */
.contact-wrap { max-width: 580px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.contact-wrap h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem; }
.contact-wrap .sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2.5rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-family: inherit; font-size: 0.9rem; padding: 0.75rem 1rem;
  transition: border-color 0.2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--yellow); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-success { display: none; background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); border-radius: 12px; padding: 1.5rem; text-align: center; }
.form-success.show { display: block; }
.form-success h3 { color: var(--green); margin-bottom: 0.4rem; }
.form-success p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Bookreader page ── */
.bookreader-hero { text-align: center; padding: 4rem 2rem 1.5rem; }
.bookreader-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem; }
.bookreader-hero h1 span { color: var(--yellow); }
.bookreader-hero p { color: var(--text-muted); font-size: 0.95rem; }
.bookreader-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 780px; margin: 2.5rem auto; padding: 0 2rem; }
.reader-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.reader-card:hover { border-color: rgba(245,197,24,0.4); transform: translateY(-2px); }
.reader-cover { height: 220px; overflow: hidden; background: var(--bg-3); display: flex; align-items: center; justify-content: center; }
.reader-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.reader-body { padding: 1.4rem; }
.reader-subject { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.3rem; }
.reader-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; }
.reader-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; margin-bottom: 1.25rem; }
.btn-app { display: block; width: 100%; text-align: center; background: var(--yellow); color: #000 !important; font-weight: 800; font-size: 0.95rem; padding: 0.8rem 1rem; border-radius: 10px; border: none; cursor: pointer; transition: background 0.18s; font-family: inherit; }
.btn-app:hover { background: var(--yellow-dark); text-decoration: none; }

/* ── Launch modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 999;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 2.5rem 2rem; max-width: 400px; width: 100%; text-align: center;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(8px); } to { opacity:1; transform: none; } }
.modal h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.4rem; }
.modal .modal-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
.modal-options { display: flex; flex-direction: column; gap: 0.75rem; }
.modal-opt {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.25rem; cursor: pointer; transition: all 0.15s; text-decoration: none;
  display: block; text-align: left;
}
.modal-opt:hover { border-color: var(--yellow); background: rgba(245,197,24,0.06); text-decoration: none; }
.modal-opt.primary-opt { background: var(--yellow); border-color: var(--yellow); }
.modal-opt.primary-opt:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.modal-opt .opt-title { font-size: 0.95rem; font-weight: 800; color: #000; }
.modal-opt:not(.primary-opt) .opt-title { color: var(--text); }
.modal-opt .opt-sub { font-size: 0.78rem; color: #555; margin-top: 0.15rem; }
.modal-opt:not(.primary-opt) .opt-sub { color: var(--text-muted); }
.modal-close { margin-top: 1.25rem; font-size: 0.8rem; color: var(--text-dim); cursor: pointer; background: none; border: none; font-family: inherit; }
.modal-close:hover { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 2.25rem; }
  .nav { padding: 1rem; }
  .nav-links { gap: 0.75rem; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stats-bar > :last-child { grid-column: span 2; }
  .book-detail { flex-direction: column; }
  .book-detail-cover, .book-detail-cover-mock { width: 140px; }
  .quiz-wrap { padding: 1.25rem; }
}
