/* ================================================================
   AI COUNTRY — custom visual identity (on top of Bootstrap 5)
   ================================================================ */

:root{
  --ac-bg: #0b0c14;
  --ac-bg-alt: #10121c;
  --ac-surface: #161826;
  --ac-surface-2: #1d2033;
  --ac-border: rgba(255,255,255,.08);
  --ac-text: #e9eaf2;
  --ac-text-dim: #9a9dbd;
  --ac-primary: #7c5cff;
  --ac-primary-2: #33d5ff;
  --ac-gradient: linear-gradient(135deg, #7c5cff 0%, #33d5ff 100%);
  --ac-radius: 18px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body{
  background: var(--ac-bg);
  color: var(--ac-text);
  font-family: var(--font-body);
}
h1,h2,h3,h4,h5,.ac-brand{ font-family: var(--font-display); }

a{ color: var(--ac-primary-2); text-decoration:none; }
a:hover{ color:#fff; }

/* ---------- Navbar ---------- */
.ac-navbar{
  background: rgba(11,12,20,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ac-border);
  padding-top:.75rem; padding-bottom:.75rem;
}
.ac-brand{ font-weight:700; font-size:1.35rem; color:#fff; letter-spacing:.5px; }
.ac-brand-mark{
  background: var(--ac-gradient);
  -webkit-background-clip: text; background-clip:text; color:transparent;
  margin-right:2px;
}
.ac-navbar .nav-link{ color: var(--ac-text-dim); font-weight:500; }
.ac-navbar .nav-link.active, .ac-navbar .nav-link:hover{ color:#fff; }
.ac-search-form input{
  background: var(--ac-surface); border:1px solid var(--ac-border); color:#fff;
  border-radius: 999px; min-width: 200px;
}
.ac-search-form input::placeholder{ color: var(--ac-text-dim); }

.btn-ac-primary{
  background: var(--ac-gradient); border:none; color:#fff; font-weight:600;
  border-radius: 999px; padding:.5rem 1.2rem;
}
.btn-ac-primary:hover{ color:#fff; filter:brightness(1.1); }
.btn-ac-outline{
  border:1px solid var(--ac-border); color: var(--ac-text); border-radius:999px;
  background:transparent;
}
.btn-ac-outline:hover{ border-color: var(--ac-primary-2); color:#fff; }

/* ---------- Hero ---------- */
.ac-hero{
  position:relative; overflow:hidden;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(50% 50% at 10% 20%, rgba(51,213,255,.15), transparent 60%);
}
.ac-hero-eyebrow{
  display:inline-block; font-size:.8rem; letter-spacing:1.5px; text-transform:uppercase;
  color: var(--ac-primary-2); border:1px solid var(--ac-border); border-radius:999px;
  padding:.35rem 1rem; margin-bottom:1.25rem;
}
.ac-hero h1{
  font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight:700; color:#fff; line-height:1.1;
}
.ac-hero p.lead{ color: var(--ac-text-dim); max-width: 560px; font-size:1.15rem; }
.ac-hero-covers{
  display:flex; gap:1rem; justify-content:center; align-items:center; flex-wrap:wrap;
}
.ac-hero-cover{
  width: 140px; aspect-ratio: 3/4.2; border-radius:14px; background: var(--ac-surface-2);
  border:1px solid var(--ac-border); display:flex; align-items:center; justify-content:center;
  box-shadow: 0 20px 40px rgba(0,0,0,.4); transform: rotate(var(--r,0deg));
  color: var(--ac-primary-2); font-size:2rem;
}
.ac-hero-cover:nth-child(1){ --r:-6deg; }
.ac-hero-cover:nth-child(3){ --r:6deg; }

/* ---------- Section headings ---------- */
.ac-section{ padding: 4.5rem 0; }
.ac-section-title{ color:#fff; font-weight:700; font-size:2rem; }
.ac-section-sub{ color: var(--ac-text-dim); max-width:640px; }

/* ---------- Book cards ---------- */
.ac-book-card{
  background: var(--ac-surface); border:1px solid var(--ac-border); border-radius: var(--ac-radius);
  overflow:hidden; height:100%; display:flex; flex-direction:column;
  transition: transform .2s ease, border-color .2s ease;
}
.ac-book-card:hover{ transform: translateY(-4px); border-color: var(--ac-primary-2); }
.ac-book-cover{ width:100%; aspect-ratio: 3/4; object-fit:cover; background: var(--ac-surface-2); }
.ac-book-cover-placeholder{ display:flex; align-items:center; justify-content:center; font-size:2.5rem; color: var(--ac-primary-2); }
.ac-book-card-body{ padding:1.1rem 1.2rem 1.4rem; flex:1; display:flex; flex-direction:column; }
.ac-badge-category{
  font-size:.7rem; text-transform:uppercase; letter-spacing:.5px; color: var(--ac-primary-2);
  margin-bottom:.4rem; display:inline-block;
}
.ac-book-title{ font-size:1.05rem; margin-bottom:.4rem; }
.ac-book-title a{ color:#fff; }
.ac-book-excerpt{ color: var(--ac-text-dim); font-size:.88rem; flex:1; }

/* ---------- Category cards ---------- */
.ac-category-card{
  display:flex; flex-direction:column; align-items:center; gap:.6rem;
  background: var(--ac-surface); border:1px solid var(--ac-border); border-radius: var(--ac-radius);
  padding: 1.5rem 1rem; text-align:center; color: var(--ac-text);
  transition: transform .2s ease, border-color .2s ease;
}
.ac-category-card:hover{ transform: translateY(-3px); border-color: var(--ac-primary); color:#fff; }
.ac-category-icon{
  width:52px; height:52px; border-radius:50%; background: var(--ac-gradient);
  display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:#fff;
}
.ac-category-name{ font-size:.9rem; font-weight:500; }

/* ---------- Membership / CTA ---------- */
.ac-cta{
  background: var(--ac-surface); border:1px solid var(--ac-border); border-radius: 24px;
  padding: 3.5rem 2rem; text-align:center;
  background-image: radial-gradient(60% 100% at 50% 0%, rgba(124,92,255,.2), transparent);
}
.ac-plan-card{
  background: var(--ac-surface); border:1px solid var(--ac-border); border-radius: var(--ac-radius);
  padding: 2.2rem; height:100%;
}
.ac-plan-card.ac-plan-highlight{ border-color: var(--ac-primary); box-shadow: 0 0 0 1px var(--ac-primary); }
.ac-plan-price{ font-family: var(--font-display); font-size:2.4rem; font-weight:700; color:#fff; }
.ac-plan-card ul{ list-style:none; padding:0; margin: 1.2rem 0; }
.ac-plan-card ul li{ padding:.35rem 0; color: var(--ac-text-dim); }
.ac-plan-card ul li i{ color: var(--ac-primary-2); margin-right:.5rem; }

/* ---------- Forms ---------- */
.ac-auth-card{
  max-width: 440px; margin: 4rem auto; background: var(--ac-surface);
  border:1px solid var(--ac-border); border-radius: var(--ac-radius); padding:2.5rem;
}
.form-control, .form-select{
  background: var(--ac-surface-2); border:1px solid var(--ac-border); color:#fff;
}
.form-control:focus, .form-select:focus{
  background: var(--ac-surface-2); color:#fff; border-color: var(--ac-primary);
  box-shadow: 0 0 0 .2rem rgba(124,92,255,.25);
}
.form-control::placeholder{ color: var(--ac-text-dim); }
label{ color: var(--ac-text-dim); font-size:.9rem; }

/* ---------- Footer ---------- */
.ac-footer{ background: var(--ac-bg-alt); border-top:1px solid var(--ac-border); margin-top:4rem; }
.ac-footer-tagline{ color: var(--ac-text-dim); max-width:280px; font-size:.9rem; }
.ac-footer-heading{ color:#fff; font-size:.85rem; text-transform:uppercase; letter-spacing:.5px; margin-bottom:1rem; }
.ac-footer-links a{ color: var(--ac-text-dim); }
.ac-footer-links li{ margin-bottom:.5rem; }
.ac-footer-hr{ border-color: var(--ac-border); }
.ac-footer-copy{ color: var(--ac-text-dim); font-size:.85rem; }

/* ---------- Book detail / reader ---------- */
.ac-book-hero-cover{
  width:100%; max-width:280px; aspect-ratio:3/4; object-fit:cover; border-radius:16px;
  border:1px solid var(--ac-border); box-shadow: 0 25px 50px rgba(0,0,0,.5);
}
.ac-lock-panel{
  background: var(--ac-surface); border:1px dashed var(--ac-border); border-radius: var(--ac-radius);
  padding: 2rem; text-align:center;
}
.ac-reader-sidebar{ background: var(--ac-surface); border-right:1px solid var(--ac-border); min-height:100vh; }
.ac-reader-content{ max-width: 760px; margin:0 auto; line-height:1.8; font-size:1.08rem; }
.ac-progress-track{ height:6px; background: var(--ac-surface-2); border-radius:999px; overflow:hidden; }
.ac-progress-fill{ height:100%; background: var(--ac-gradient); }

@media (max-width: 991.98px){
  .ac-hero{ padding: 4rem 0 3rem; text-align:center; }
  .ac-hero p.lead{ margin-left:auto; margin-right:auto; }
}
