@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy: #0a1628;
  --navy-mid: #112240;
  --navy-light: #1a3a5c;
  --green: #00b894;
  --green-dark: #00876e;
  --green-glow: rgba(0, 184, 148, 0.15);
  --gold: #f4c542;
  --gold-light: rgba(244, 197, 66, 0.1);
  --white: #f0f4f8;
  --white-dim: rgba(240, 244, 248, 0.7);
  --white-faint: rgba(240, 244, 248, 0.08);
  --border: rgba(0, 184, 148, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-green: 0 4px 20px rgba(0, 184, 148, 0.25);
  --radius: 12px;
  --radius-lg: 20px;
}

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

body {
  background-color: var(--navy);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 184, 148, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(244, 197, 66, 0.03) 0%, transparent 50%);
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--white);
}

p { color: var(--white-dim); }

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Navbar ── */
.rp-navbar {
  background: rgba(10, 22, 40, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.rp-navbar .container {
  display: block;
  padding: 0.6rem 1rem;
}

.rp-navbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rp-navbar .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white) !important;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rp-navbar .navbar-brand span {
  color: var(--green);
}

.rp-nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.rp-nav-links::-webkit-scrollbar { display: none; }

.rp-navbar .nav-link {
  color: var(--white-dim) !important;
  font-size: 0.78rem !important;
  font-weight: 500;
  padding: 0.3rem 0.45rem !important;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.rp-navbar .nav-link:hover {
  color: var(--white) !important;
  background: var(--white-faint);
}

.rp-navbar-search {
  margin-top: 0.5rem;
  position: relative;
}

/* ── Buttons ── */
.btn-rp-primary {
  background: var(--green);
  color: var(--navy) !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  transition: all 0.2s;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

.btn-rp-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-green);
  color: var(--navy) !important;
}

.btn-rp-outline {
  background: transparent;
  color: var(--white) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

.btn-rp-outline:hover {
  border-color: var(--green);
  color: var(--green) !important;
  background: var(--green-glow);
}

.btn-rp-gold {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  transition: all 0.2s;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

.btn-rp-gold:hover {
  background: #e6b830;
  transform: translateY(-1px);
  color: var(--navy) !important;
}

/* ── Cards ── */
.rp-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.rp-card:hover {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: var(--shadow-green);
}

/* ── Bootstrap card override ── */
.card {
  background: var(--navy-mid) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--white) !important;
}

.card h6, .card p, .card small, .card-body h6, .card-body p {
  color: var(--white) !important;
}

/* ── Hero Section ── */
.rp-hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.rp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 184, 148, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.rp-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.rp-hero h1 .accent { color: var(--green); }

.rp-hero p {
  font-size: 1.1rem;
  color: var(--white-dim);
  max-width: 500px;
  margin-bottom: 2rem;
}

.rp-hero-illustration {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: block;
}

/* ── Badge ── */
.rp-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.rp-badge-green {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.rp-badge-gold {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid rgba(244, 197, 66, 0.3);
}

.rp-badge-gray {
  background: var(--white-faint);
  color: var(--white-dim);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Price Tag ── */
.rp-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
}

/* ── Section Titles ── */
.rp-section-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.rp-section-subtitle {
  color: var(--white-dim);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ── Category Pills ── */
.rp-category-pill {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--white-dim);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.rp-category-pill:hover,
.rp-category-pill.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
}

/* ── Forms ── */
.rp-form-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-control, .form-select {
  background: var(--navy-light) !important;
  border: 1px solid var(--border) !important;
  color: var(--white) !important;
  border-radius: 8px !important;
  padding: 0.65rem 1rem !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px var(--green-glow) !important;
  outline: none !important;
}

.form-control::placeholder { color: var(--white-dim) !important; }

label {
  color: var(--white-dim);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

/* ── Alerts ── */
.rp-alert {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.rp-alert-success {
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--green);
}

.rp-alert-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #ff6b7a;
}

.rp-alert-info {
  background: rgba(244, 197, 66, 0.08);
  border: 1px solid rgba(244, 197, 66, 0.25);
  color: var(--gold);
}

/* ── Table ── */
.rp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.rp-table thead th {
  background: var(--navy-light);
  color: var(--white-dim);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 1rem;
}

.rp-table thead th:first-child { border-radius: 8px 0 0 8px; }
.rp-table thead th:last-child { border-radius: 0 8px 8px 0; }

.rp-table tbody tr {
  background: var(--navy-mid);
  transition: background 0.2s;
}

.rp-table tbody tr:hover { background: var(--navy-light); }

.rp-table tbody td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--white-dim);
}

.rp-table tbody td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
}

.rp-table tbody td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
}

/* ── Footer ── */
.rp-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 5rem;
  text-align: center;
  color: var(--white-dim);
  font-size: 0.875rem;
}

.rp-footer a { color: var(--green); }

/* ── Quiz Timer ── */
.rp-timer {
  background: var(--navy-mid);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.rp-timer .timer-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white-dim);
  display: block;
}

.rp-timer .timer-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff6b7a;
  display: block;
  line-height: 1;
}

/* ── Premium Plan Cards ── */
.rp-plan-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.rp-plan-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-green);
}

.rp-plan-card.featured {
  border: 2px solid var(--green) !important;
  background: linear-gradient(135deg, var(--navy-mid) 0%, rgba(0, 184, 148, 0.08) 100%);
  transform: scale(1.02);
}

.rp-plan-card.featured:hover {
  transform: scale(1.02) translateY(-5px);
}

.rp-plan-price {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
  margin: 1rem 0 0.25rem;
  display: block;
}

.rp-plan-period {
  color: var(--white-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.rp-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
  flex: 1;
  border-top: 1px solid var(--white-faint);
}

.rp-plan-features li {
  padding: 0.5rem 0;
  color: var(--white-dim);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--white-faint);
}

.rp-plan-features li:last-child { border-bottom: none; }

/* ── Stats ── */
.rp-stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rp-stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  display: block;
}

.rp-stat-label {
  font-size: 0.8rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── List group ── */
.list-group-item {
  background: var(--navy-mid) !important;
  border-color: var(--border) !important;
  color: var(--white) !important;
}

.list-group-item:hover { background: var(--navy-light) !important; }

.list-group-item input[type="radio"] { accent-color: var(--green); }

/* ── Ebook detail ── */
.ebook-info-col {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Store grid fix ── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.animate-in { animation: fadeInUp 0.6s ease forwards; }
.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.6s; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.6s; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; animation-name: fadeInUp; animation-duration: 0.6s; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .rp-hero { padding: 2.5rem 0 2rem; }
  .rp-hero h1 { font-size: 2rem; }
  .rp-plan-card { margin-bottom: 1rem; }
  .rp-plan-card.featured { transform: scale(1); }

  .ebook-info-col .d-flex.gap-2.flex-wrap {
    flex-direction: column;
  }

  .ebook-info-col .d-flex.gap-2.flex-wrap a {
    width: 100%;
    text-align: center;
  }
}

/* ── Row flex fix for plan cards ── */
.row.g-4 > [class*="col"] {
  display: flex;
}

.row.g-4 > [class*="col"] > .rp-plan-card {
  width: 100%;
}

/* ── Premium lock blur ── */
.premium-locked-img {
  filter: blur(3px) !important;
  transform: scale(1.05);
}

.premium-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.6);
  border-radius: 8px;
}