:root {
  --ml-bg: #05060a;
  --ml-bg-alt: #0b0d14;
  --ml-card-bg: #10131c;
  --ml-card-bg-alt: #151827;
  --ml-border-subtle: #232635;
  --ml-accent: #4f8cff;
  --ml-accent-soft: rgba(79, 140, 255, 0.15);
  --ml-text-main: #f5f7ff;
  --ml-text-muted: #a3a7c2;
  --ml-highlight: #f5d36b;
  --ml-radius-lg: 18px;
  --ml-radius-md: 12px;
  --ml-radius-sm: 8px;
  --ml-shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ml-font-main:
    system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(
    circle at top,
    #151827 0,
    #05060a 55%,
    #020308 100%
  );
  color: var(--ml-text-main);
  font-family: var(--ml-font-main);
}

/* Layout */

.ml-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ml-header {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.ml-title {
  font-size: clamp(2.4rem, 3vw, 3rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.ml-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--ml-text-muted);
  max-width: 640px;
  margin-inline: auto;
}

.ml-highlight {
  color: var(--ml-highlight);
  font-weight: 600;
}

.ml-main {
  padding-bottom: 3rem;
}

.ml-section {
  padding: 2.5rem 0;
}

.ml-section-alt {
  background: linear-gradient(
    135deg,
    rgba(21, 24, 39, 0.9),
    rgba(5, 6, 10, 0.95)
  );
}

.ml-section-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.ml-section-desc {
  margin: 0 0 1.75rem;
  color: var(--ml-text-muted);
  font-size: 0.95rem;
}

/* Book grids */

.ml-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.ml-book-grid-featured {
  margin-top: 1.5rem;
}

.ml-book-card {
  background: var(--ml-card-bg);
  border-radius: var(--ml-radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--ml-border-subtle);
  box-shadow: var(--ml-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.ml-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
  border-color: var(--ml-accent);
  background: var(--ml-card-bg-alt);
}

.ml-book-card-small {
  min-width: 200px;
}

/* Book content */

.ml-book-cover-placeholder {
  width: 100%;
  height: 180px;
  border-radius: var(--ml-radius-md);
  background: radial-gradient(circle at top, #2a2f45, #151827);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ml-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* If you use real images, apply this class instead */
/*
.ml-book-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--ml-radius-md);
  margin-bottom: 0.75rem;
}
*/

.ml-book-title {
  font-size: 1rem;
  margin: 0;
}

.ml-book-author {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ml-text-muted);
}

.ml-book-summary {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.9rem;
  color: var(--ml-text-muted);
}

.ml-book-why {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ml-text-main);
}

/* Categories */

.ml-category {
  margin-bottom: 2rem;
}

.ml-category-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

/* Scroll row */

.ml-scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.ml-scroll-row::-webkit-scrollbar {
  height: 6px;
}

.ml-scroll-row::-webkit-scrollbar-track {
  background: #05060a;
}

.ml-scroll-row::-webkit-scrollbar-thumb {
  background: #2a2f45;
  border-radius: 999px;
}

/* Buttons & links */

.ml-button,
.ml-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.ml-button {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--ml-accent);
  background: var(--ml-accent-soft);
  color: var(--ml-text-main);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.ml-button:hover {
  background: var(--ml-accent);
  border-color: var(--ml-accent);
  transform: translateY(-1px);
}

.ml-button-primary {
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.ml-link {
  padding: 0.25rem 0;
  color: var(--ml-accent);
}

.ml-link:hover {
  text-decoration: underline;
}

/* CTA */

.ml-cta-section {
  text-align: center;
}

.ml-cta-container {
  padding: 2rem 1.5rem;
  border-radius: var(--ml-radius-lg);
  background: radial-gradient(circle at top, #1b2035, #05060a);
  border: 1px solid var(--ml-border-subtle);
  box-shadow: var(--ml-shadow-soft);
}

/* Footer */

.ml-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.5rem 0 2rem;
  background: #020308;
}

.ml-footer-text {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ml-text-muted);
}

.ml-footer-small {
  margin-top: 0.35rem;
}

/* Responsive tweaks */

@media (max-width: 640px) {
  .ml-header {
    padding-top: 2.5rem;
  }

  .ml-cta-container {
    padding: 1.5rem 1.25rem;
  }
}
.nav-back {
  margin-top: 12px;
}

.nav-back a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
