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

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

:root {
  --bg: #0a0b0f;
  --bg2: #0f1117;
  --bg3: #14161f;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(194,152,81,0.4);
  --gold: #c29851;
  --gold-light: #e6c587;
  --gold-dark: #a07837;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --green: #10b981;
  --blue: #3b82f6;
  --red: #ef4444;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 10% 10%, rgba(194,152,81,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(245,158,11,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── NAV (Unification) ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 3rem);
  height: 72px;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(194,152,81,0.4);
}

.nav-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo-text span { color: var(--gold-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}

.nav-links a.active {
  color: var(--gold-light);
  background: rgba(194,152,81,0.12);
  border-color: rgba(194,152,81,0.3);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-login:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

.btn-register {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(194,152,81,0.3);
}

.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(194,152,81,0.4);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1000px;
  margin: 32px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { color: var(--text-muted); }

/* ── PAGE LAYOUT ── */
.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  position: relative;
  z-index: 1;
}
.page-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}
.page-header p {
  color: var(--text-dim);
  font-size: 1.1rem;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 12px;
  vertical-align: middle;
}
.badge-beginner {
  background: rgba(16,185,129,0.12);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.2);
}
.badge-intermediate {
  background: rgba(245,158,11,0.12);
  color: var(--gold-light);
  border: 1px solid rgba(245,158,11,0.2);
}
.badge-advanced {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}

/* ── TOC ── */
.toc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
.toc h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.toc ol {
  padding-left: 20px;
}
.toc li {
  margin: 8px 0;
  color: var(--text-dim);
}
.toc a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.toc a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ── SECTIONS ── */
.guide-section {
  margin-bottom: 56px;
}
.guide-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.guide-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
  margin: 32px 0 16px;
}
.guide-section p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.7;
}
.guide-section ul, .guide-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.guide-section li {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 8px 0;
}
.guide-section strong {
  color: var(--text);
}

/* ── CARDS GRID (index) ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.guide-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(194,152,81,0.12);
}
.guide-card .card-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 4px;
}
.guide-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.guide-card .card-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}
.guide-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.card-read {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
  transition: transform 0.2s;
}
.guide-card:hover .card-read {
  transform: translateX(4px);
}

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead th {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 20px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody tr {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
tbody tr:hover {
  background: rgba(255,255,255,0.015);
}
tbody td {
  padding: 14px 20px;
  color: var(--text-dim);
  vertical-align: middle;
}
tbody td strong {
  color: var(--text);
}
.td-gold {
  color: var(--gold-light);
  font-weight: 600;
}
.td-green {
  color: var(--green);
  font-weight: 600;
}
.td-muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* tier badges in table */
.tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.t4 { background: rgba(16,185,129,0.15); color: var(--green); }
.t5 { background: rgba(245,158,11,0.15); color: var(--gold-light); }
.t6 { background: rgba(59,130,246,0.15); color: var(--blue); }
.t7 { background: rgba(239,68,68,0.15); color: var(--red); }
.t8 { background: rgba(194,152,81,0.15); color: var(--gold-light); }

/* ── TIP BOX ── */
.tip-box {
  background: rgba(245,158,11,0.03);
  border: 1px solid rgba(245,158,11,0.15);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.tip-box strong { color: var(--gold-light); }
.info-box {
  background: rgba(59,130,246,0.03);
  border: 1px solid rgba(59,130,246,0.15);
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.info-box strong { color: var(--blue); }

/* ── FOOTER ── */
.guide-footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.guide-footer a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.guide-footer a:hover {
  color: var(--gold-light);
}
.nav-arrows {
  display: flex;
  gap: 24px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .page { padding: 16px 16px 60px; }
  .cards-grid { grid-template-columns: 1fr; }
  .guide-footer { flex-direction: column; align-items: flex-start; }
}


/* ── GLOBAL FOOTER (Added for Unification) ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg);
}

.footer-logo, .footer-logo:visited {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted) !important;
  text-decoration: none;
}
.footer-logo span { color: var(--gold-light); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a, .footer-links a:visited {
  color: var(--text-muted) !important;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text) !important;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Mobile & SEO Performance Optimizations === */
.nav-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(240, 192, 64, 0.35));
  transition: transform 0.2s ease;
}
.nav-logo-img:hover {
  transform: scale(1.08);
}
.footer-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}
.auth-logo-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 4px 16px rgba(240, 192, 64, 0.3));
}
.link-gold {
  color: var(--gold-light, #fbbf24) !important;
}
.guide-cta-box {
  margin-top: 3.5rem;
  padding: 2.2rem 2rem;
  background: linear-gradient(135deg, rgba(194, 152, 81, 0.12), rgba(15, 20, 30, 0.8));
  border: 1px solid rgba(194, 152, 81, 0.25);
  border-radius: 16px;
  text-align: center;
}
.guide-cta-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.guide-cta-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.guide-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #c29851, #e0b868);
  color: #0a0c10;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.guide-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(194, 152, 81, 0.4);
}
.tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}
.tier.t2 { background: #4b5563; }
.tier.t3 { background: #15803d; }
.tier.t4 { background: #0369a1; }
.tier.t5 { background: #b45309; }
.tier.t6 { background: #dc2626; }
.tier.t7 { background: #a21caf; }
.tier.t8 { background: #eab308; color: #000; }
.color-danger { color: #f87171 !important; }
.color-teal { color: #2dd4bf !important; }
.color-blue { color: #60a5fa !important; }
.color-purple { color: #c084fc !important; }
.color-green { color: #4ade80 !important; }
.hidden { display: none !important; }

/* Mobile Tap Target Optimization */
@media (max-width: 768px) {
  .nav-links a, .btn, .guide-cta-btn, .category-btn, .yt-nav-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
