/* ===========================
   RIFT — style.css
   Dark Premium Design System
   =========================== */

:root {
  --bg: #07070F;
  --bg2: #0D0D1A;
  --bg3: #111120;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.07);
  --primary: #C41E3A;
  --primary-glow: rgba(196, 30, 58, 0.3);
  --primary-light: #E83050;
  --gold: #F59E0B;
  --gold-glow: rgba(245, 158, 11, 0.3);
  --purple: #8B5CF6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --teal: #2DD4BF;
  --text: #E8E8F4;
  --text-muted: #6B6B90;
  --text-dim: #3A3A58;
  --gradient: linear-gradient(135deg, #C41E3A, #8B5CF6);
  --nav-h: 70px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'DM Sans', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- CANVAS BG ---- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(7, 7, 15, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary));
  animation: pulse-glow 3s ease-in-out infinite;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 0 20px var(--primary-glow);
}

.nav-cta:hover {
  background: var(--primary-light);
  box-shadow: 0 0 35px var(--primary-glow);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 2rem 1.5rem;
  background: rgba(7, 7, 15, 0.98);
  border-top: 1px solid var(--card-border);
}

.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--text);
}

.mobile-menu .nav-cta {
  display: inline-block;
  width: fit-content;
}

.mobile-menu.open {
  display: flex;
}

@media(max-width:768px) {
  .nav-links {
    display: none;
  }

  .navbar .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* ---- SECTION COMMON ---- */
section {
  position: relative;
  z-index: 1;
}

.section-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(196, 30, 58, 0.12) 0%, transparent 70%);
  top: 10%;
  left: -10%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  flex: 1;
  max-width: 540px;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(196, 30, 58, 0.1);
  border: 1px solid rgba(196, 30, 58, 0.25);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.tag-dot {
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.7s 0.1s ease both;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.7s 0.3s ease both;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--primary-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp 0.7s 0.4s ease both;
}

.stat {}

.stat-num {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--card-border);
}

/* ---- HERO VISUAL ---- */
.hero-visual {
  flex: 1;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeLeft 0.8s 0.2s ease both;
}

.hero-card-wrap {
  position: relative;
  height: 380px;
}

.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  position: absolute;
  transition: transform var(--transition);
}

.hero-card:hover {
  transform: translateY(-4px);
}

.main-card {
  top: 20px;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

.card-inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.card-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(var(--primary), var(--purple), var(--primary));
  animation: spin 4s linear infinite;
}

.avatar-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 1;
}

.card-info {
  flex: 1;
}

.card-novel-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.card-name {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.card-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-stats-row {
  display: flex;
  gap: 0.75rem;
}

.mini-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  text-align: center;
}

.ms-label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.ms-val {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
}

.card-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(196, 30, 58, 0.08) inset;
  pointer-events: none;
}

.side-card {
  bottom: 20px;
  right: 0;
  width: 200px;
  padding: 0.9rem 1rem;
}

.side-card-2 {
  bottom: 100px;
  left: -30px;
  width: 180px;
  padding: 0.9rem 1rem;
}

.side-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.side-avatar {
  font-size: 1.5rem;
  color: var(--gold);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: rgba(196, 30, 58, 0.15);
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-dot {
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

/* ---- FEATURES ---- */
.features {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.feat-large {
  grid-column: span 2;
}

.feat-medium {
  grid-column: span 2;
}

.feat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.04), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feat-card:hover {
  border-color: rgba(196, 30, 58, 0.2);
  transform: translateY(-3px);
}

.feat-card:hover::before {
  opacity: 1;
}

.feat-icon {
  font-size: 1.75rem;
  margin-bottom: 0.9rem;
}

.feat-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.feat-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.feat-demo-bar {
  margin-top: 1.25rem;
  background: rgba(196, 30, 58, 0.08);
  border: 1px solid rgba(196, 30, 58, 0.15);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  overflow: hidden;
}

.demo-bar-inner {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-style: italic;
  animation: typing-glow 3s ease-in-out infinite;
}

@media(max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feat-large,
  .feat-medium {
    grid-column: span 2;
  }
}

@media(max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feat-large,
  .feat-medium {
    grid-column: span 1;
  }
}

/* ---- CHARACTERS ---- */
.characters-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.novel-selector {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.novel-pill {
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.03em;
}

.novel-pill.active {
  background: rgba(196, 30, 58, 0.12);
  border-color: rgba(196, 30, 58, 0.35);
  color: var(--primary-light);
}

.novel-pill:hover:not(.soon) {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.novel-pill.soon {
  opacity: 0.4;
  cursor: default;
  font-style: italic;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media(max-width:860px) {
  .char-grid {
    grid-template-columns: 1fr;
  }
}

.char-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.char-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 30, 58, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.char-portrait {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.sunny-portrait {
  background: linear-gradient(135deg, #0A0A15, #1A0008, #0A0A15);
}

.nephis-portrait {
  background: linear-gradient(135deg, #0A0A15, #1A1000, #0A0A15);
}

.cassie-portrait {
  background: linear-gradient(135deg, #0A0A15, #0E0020, #0A0A15);
}

.effie-portrait {
  background: linear-gradient(135deg, #0A0A15, #001A1A, #0A0A15);
}

.portrait-symbol {
  font-size: 4rem;
  z-index: 1;
  filter: drop-shadow(0 0 20px currentColor);
  animation: float-symbol 4s ease-in-out infinite;
}

.portrait-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px);
}

.portrait-glow.red {
  background: var(--primary);
}

.portrait-glow.gold {
  background: var(--gold);
}

.portrait-glow.purple {
  background: var(--purple);
}

.portrait-glow.teal {
  background: var(--teal);
}

.char-details {
  padding: 1.5rem;
  flex: 1;
}

.char-novel-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.char-name {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.char-epithet {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.char-rank-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(196, 30, 58, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(196, 30, 58, 0.25);
  margin-bottom: 0.75rem;
}

.char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.char-powers {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.power-bar {}

.pb-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.pb-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
}

.pb-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--primary);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--primary-glow);
}

.pb-fill.gold {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.pb-fill.purple {
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple-glow);
}

.pb-fill.teal {
  background: var(--teal);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
}

.char-read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.char-read-more:hover {
  color: var(--primary);
}

.view-all-wrap {
  text-align: center;
}

/* ---- RECAP ---- */
.recap-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(196, 30, 58, 0.04) 50%, transparent);
}

.recap-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 5rem;
  align-items: center;
}

@media(max-width:820px) {
  .recap-inner {
    flex-direction: column;
    gap: 3rem;
  }
}

.recap-left {
  flex: 1;
}

.recap-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.rfl-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rfl-item::before {
  content: '';
}

.recap-right {
  flex: 1;
}

.recap-ui-demo {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}

.recap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.recap-novel-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  background: rgba(196, 30, 58, 0.1);
  border: 1px solid rgba(196, 30, 58, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.recap-status {
  font-size: 0.7rem;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.recap-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

.recap-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recap-input-group {
  flex: 1;
}

.recap-input-group label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.recap-input-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: text;
  transition: border-color var(--transition);
}

.recap-input-field:hover {
  border-color: rgba(196, 30, 58, 0.3);
}

.recap-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
  margin-top: 1.2rem;
}

.recap-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.recap-opt {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.recap-opt.active {
  background: rgba(196, 30, 58, 0.12);
  border-color: rgba(196, 30, 58, 0.3);
  color: var(--primary-light);
}

.recap-opt:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.recap-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.05em;
  box-shadow: 0 0 25px var(--primary-glow);
  margin-bottom: 1.25rem;
}

.recap-btn:hover {
  background: var(--primary-light);
  box-shadow: 0 0 40px var(--primary-glow);
}

.recap-result {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  display: none;
  animation: fadeUp 0.4s ease;
}

.recap-result.show {
  display: block;
}

.recap-result-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.recap-result-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.recap-tags-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rtag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.rtag.power {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.rtag.lore {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.rtag.warning {
  background: rgba(196, 30, 58, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(196, 30, 58, 0.2);
}

/* ---- POWER SYSTEM ---- */
.power-section {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.rank-ladder {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 3rem;
  gap: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: default;
  position: relative;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.rank-item.highlight-rank {
  background: rgba(196, 30, 58, 0.08);
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: 0 0 30px rgba(196, 30, 58, 0.1);
}

.rank-num {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.highlight-rank .rank-num {
  color: var(--primary-light);
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.rank-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rank-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dormant-color {
  background: #3A3A58;
}

.awakened-color {
  background: #2DD4BF;
}

.refined-color {
  background: #60A5FA;
}

.master-color {
  background: #A855F7;
}

.saint-color {
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.transcendent-color {
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.rank-connector {
  width: 2px;
  height: 12px;
  background: var(--card-border);
  margin-left: calc(1.5rem + 18px);
}

/* ---- COMMUNITY ---- */
.community-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

@media(max-width:768px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
}

.thread-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}

.thread-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
}

.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.thread-chap {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.thread-hot {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-light);
}

.thread-new {
  font-size: 0.68rem;
  font-weight: 700;
  color: #4ade80;
}

.thread-trending {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
}

.thread-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 1rem;
  color: var(--text);
}

.thread-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-user {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.thread-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ---- CTA ---- */
.cta-section {
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196, 30, 58, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.cta-rift-symbol {
  font-size: 3rem;
  color: var(--primary);
  filter: drop-shadow(0 0 20px var(--primary));
  margin-bottom: 1.5rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

.cta-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.cta-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.cta-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 8px var(--primary));
  }

  50% {
    filter: drop-shadow(0 0 20px var(--primary));
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes float-symbol {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes typing-glow {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.reveal-card {
  animation: fadeUp 0.8s 0.3s ease both;
}

.reveal-card-delay {
  animation: fadeLeft 0.7s 0.5s ease both;
}

.reveal-card-delay2 {
  animation: fadeLeft 0.7s 0.65s ease both;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media(max-width:900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-h) + 2rem);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    max-width: 350px;
    width: 100%;
  }

  .bar-inner {
    margin-left: 0;
  }
}

/* ---- NEWSLETTER SECTION ---- */
.newsletter-section {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(196, 30, 58, 0.04) 50%, transparent);
  text-align: center;
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.newsletter-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.newsletter-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-input:focus {
  border-color: rgba(196, 30, 58, 0.5);
}

.newsletter-input::placeholder {
  color: var(--text-dim);
}

.newsletter-btn {
  padding: 0.85rem 1.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 0 25px var(--primary-glow);
}

.newsletter-btn:hover {
  background: var(--primary-light);
  box-shadow: 0 0 40px var(--primary-glow);
  transform: translateY(-1px);
}

.newsletter-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color 0.3s;
}

@media(max-width:500px) {
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }
}

/* ---- SUPPORT / AFFILIATE SECTION ---- */
.support-section {
  padding: 4rem 2rem 5rem;
  text-align: center;
}

.support-inner {
  max-width: 480px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.support-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.support-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.support-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--card-border);
  color: var(--text);
}

.webnovel-btn {
  background: rgba(255, 83, 26, 0.12);
  border-color: rgba(255, 83, 26, 0.3);
  color: #FF7744;
}

.webnovel-btn:hover {
  background: rgba(255, 83, 26, 0.2);
  transform: translateY(-1px);
}

.amazon-btn {
  background: rgba(255, 153, 0, 0.1);
  border-color: rgba(255, 153, 0, 0.3);
  color: #FF9900;
}

.amazon-btn:hover {
  background: rgba(255, 153, 0, 0.18);
  transform: translateY(-1px);
}

.donate-btn {
  background: rgba(196, 30, 58, 0.12);
  border-color: rgba(196, 30, 58, 0.3);
  color: var(--primary-light);
  box-shadow: 0 0 15px var(--primary-glow);
}

.donate-btn:hover {
  background: rgba(196, 30, 58, 0.2);
  box-shadow: 0 0 30px var(--primary-glow);
  transform: translateY(-1px);
}

.support-divider {
  width: 60px;
  height: 1px;
  background: var(--card-border);
  margin: 1.5rem auto;
}

/* ---- PWA INSTALL BANNER ---- */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10, 0, 15, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(196, 30, 58, 0.3);
  padding: 0.75rem 1.5rem;
  animation: slideUp 0.5s ease;
}

.pwa-install-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-install-icon {
  font-size: 1.5rem;
}

.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pwa-install-text strong {
  font-size: 0.9rem;
  color: var(--text);
}

.pwa-install-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pwa-install-btn {
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 20px var(--primary-glow);
}

.pwa-install-btn:hover {
  background: var(--primary-light);
}

.pwa-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---- FAQ SECTION ---- */
.faq-section {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: rgba(196, 30, 58, 0.2);
}

.faq-item[open] {
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.08);
}

.faq-q {
  padding: 1.25rem 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition);
}

.faq-q::-webkit-details-marker { display: none; }

.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-item[open] .faq-q {
  color: var(--primary-light);
}

.faq-a {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  animation: fadeUp 0.3s ease;
}

.faq-a strong {
  color: var(--text);
}