/* Geo-Arbitrage Blueprint - Print-Ready Book Styles */
@page { size: A4; margin: 0; }
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --book-bg: #0a0a0f;
  --book-surface: #12121a;
  --book-border: rgba(255,255,255,0.06);
  --book-text: #e4e4e7;
  --book-dim: #71717a;
  --book-gold: #fbbf24;
  --book-blue: #3b82f6;
  --book-emerald: #10b981;
  --book-violet: #8b5cf6;
  --book-font: 'Outfit', sans-serif;
  --book-body: 'Manrope', sans-serif;
}

body.book-page {
  background: var(--book-bg);
  color: var(--book-text);
  font-family: var(--book-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* COVER PAGES */
.book-cover {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  page-break-after: always;
}

.book-cover.front { background: linear-gradient(160deg, #0a0a1a 0%, #0d1117 50%, #0a0a0f 100%); }
.book-cover.back { background: linear-gradient(160deg, #0d1117 0%, #0a0a1a 100%); }

.cover-image {
  width: 80%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  margin-bottom: 3rem;
}

.cover-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--book-gold), #f59e0b);
  color: #000;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 100px;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.cover-title {
  font-family: var(--book-font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 60%, var(--book-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  max-width: 700px;
}

.cover-subtitle {
  font-size: 1.15rem;
  color: var(--book-dim);
  max-width: 500px;
  margin-bottom: 2rem;
}

.cover-author {
  font-size: 0.85rem;
  color: var(--book-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cover-url {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--book-gold);
  font-weight: 700;
}

/* TABLE OF CONTENTS */
.toc-page {
  min-height: 100vh;
  padding: 6rem 4rem;
  page-break-after: always;
}

.toc-page h2 {
  font-family: var(--book-font);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 3rem;
  color: #fff;
}

.toc-list {
  list-style: none;
  max-width: 600px;
}

.toc-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--book-border);
  font-size: 1.05rem;
}

.toc-item .toc-num {
  color: var(--book-gold);
  font-weight: 800;
  margin-right: 1rem;
  font-size: 0.85rem;
}

.toc-item .toc-title { font-weight: 600; flex: 1; }
.toc-item .toc-page-num { color: var(--book-dim); font-size: 0.9rem; }

/* CHAPTERS */
.book-chapter {
  padding: 4rem;
  max-width: 800px;
  margin: 0 auto;
  page-break-before: always;
}

.chapter-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--book-border);
}

.chapter-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--book-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.chapter-title {
  font-family: var(--book-font);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
}

.chapter-img {
  width: 100%;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.book-chapter h3 {
  font-family: var(--book-font);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 2.5rem 0 1rem;
}

.book-chapter p { margin-bottom: 1.2rem; color: var(--book-text); font-size: 1rem; }

/* CALLOUT BOXES */
.book-callout {
  background: var(--book-surface);
  border-left: 3px solid var(--book-gold);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.book-callout.blue { border-color: var(--book-blue); }
.book-callout.emerald { border-color: var(--book-emerald); }
.book-callout.violet { border-color: var(--book-violet); }

.book-callout strong { color: #fff; }
.callout-title { font-weight: 800; color: var(--book-gold); margin-bottom: 0.5rem; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; }
.book-callout.blue .callout-title { color: var(--book-blue); }
.book-callout.emerald .callout-title { color: var(--book-emerald); }

/* DATA TABLES */
.book-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.book-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--book-surface);
  color: var(--book-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--book-border);
}

.book-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--book-border);
}

.book-table .highlight { color: var(--book-emerald); font-weight: 700; }
.book-table .warning { color: #ef4444; font-weight: 700; }

/* CHECKLIST */
.book-checklist { list-style: none; margin: 1.5rem 0; }
.book-checklist li {
  padding: 0.6rem 0 0.6rem 2rem;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.book-checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--book-gold);
}

/* AFFILIATE BOX */
.affiliate-box {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(16,185,129,0.05));
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.affiliate-box h4 { color: #fff; font-size: 1.1rem; margin-bottom: 0.5rem; }
.affiliate-box .aff-link {
  display: inline-block;
  margin-top: 1rem;
  background: var(--book-violet);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

/* CTA */
.book-cta {
  background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(245,158,11,0.05));
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  margin: 3rem 0;
}

.book-cta h3 { color: var(--book-gold); font-size: 1.5rem; margin-bottom: 1rem; }
.book-cta .cta-url { font-size: 1.3rem; font-weight: 900; color: #fff; }

/* DISCLAIMER */
.book-disclaimer {
  font-size: 0.8rem;
  color: var(--book-dim);
  font-style: italic;
  padding: 2rem;
  border-top: 1px solid var(--book-border);
  margin-top: 3rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .book-chapter { padding: 2rem 1.5rem; }
  .toc-page { padding: 3rem 2rem; }
  .cover-title { font-size: 2rem; }
}

/* PRINT */
@media print {
  body.book-page { background: #fff; color: #111; }
  .book-cover { background: #fff !important; }
  .cover-title { -webkit-text-fill-color: #111 !important; background: none !important; }
  .book-chapter { padding: 2rem; }
  .book-callout { background: #f5f5f5; }
  .book-table th { background: #f5f5f5; }
  .chapter-title, .book-chapter h3 { color: #111; }
}
