/* ═══════════════════════════════════════════════════════════════════════════
   KS Gift Code Redeemer — Premium Dark Stylesheet
   Matches wesyarber.net terminal aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:              hsl(220, 25%, 6%);
  --bg-card:         hsl(220, 22%, 10%);
  --bg-card-hover:   hsl(220, 22%, 13%);
  --bg-input:        hsl(220, 20%, 8%);
  --bg-sidebar:      hsl(220, 28%, 7%);

  --border:          rgba(148,163,184,0.12);
  --border-accent:   rgba(99,179,237,0.35);

  --text-primary:    hsl(215, 25%, 85%);
  --text-secondary:  hsl(215, 15%, 55%);
  --text-muted:      hsl(215, 12%, 38%);

  --accent:          hsl(217, 91%, 68%);       /* blue */
  --accent-glow:     hsla(217, 91%, 68%, 0.18);
  --accent2:         hsl(158, 75%, 58%);       /* emerald */
  --accent2-glow:    hsla(158, 75%, 58%, 0.15);
  --gold:            hsl(43, 95%, 60%);
  --danger:          hsl(0, 80%, 60%);
  --warning:         hsl(38, 95%, 60%);

  --gradient-hero:   linear-gradient(135deg, hsl(217,91%,60%) 0%, hsl(270,80%,65%) 100%);

  --radius:     10px;
  --radius-lg:  16px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.35);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 32px hsla(217,91%,68%,0.12);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scanlines (subtle CRT effect) ─────────────────────────────────────── */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: hsla(220,25%,7%,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-primary); text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.25rem; color: var(--accent); }
.logo-text { font-size: 1.1rem; font-weight: 700; font-family: var(--font-mono); letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }
.logo-badge {
  font-size: 0.65rem; font-weight: 600;
  background: var(--accent-glow); border: 1px solid var(--border-accent);
  color: var(--accent); border-radius: 20px; padding: 2px 8px;
  font-family: var(--font-mono);
}
.header-nav { display: flex; gap: 0.25rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg-card-hover); color: var(--text-primary); text-decoration: none; }
.nav-link.active { background: var(--accent-glow); color: var(--accent); }

/* ── Main ────────────────────────────────────────────────────────────────── */
.site-main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.footer-text { font-size: 0.85rem; color: var(--text-secondary); }
.footer-sub { font-size: 0.75rem; color: var(--text-muted); }
.footer-sub a { color: var(--text-muted); }
.footer-sub a:hover { color: var(--accent); }

/* ── Hero Section ────────────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse, hsla(217,91%,60%,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-hero);
  box-shadow: 0 0 24px hsla(217,91%,68%,0.2);
  margin-bottom: 0.75rem;
}
.hero-icon { font-size: 1.25rem; color: #fff; }
.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

/* Stat row in hero */
.stat-row {
  display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap;
}
.stat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  min-width: 90px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-chip:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); }
.stat-val { font-size: 1.25rem; font-weight: 700; font-family: var(--font-mono); color: var(--accent); }
.stat-label { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Page Header (non-hero pages) ───────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }
.page-sub { color: var(--text-secondary); }

/* ── Content Grid ────────────────────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.content-grid--narrow {
  grid-template-columns: 1fr;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: hsla(220,25%,7%,0.5);
}
.card-header h2 { font-size: 1rem; font-weight: 600; }
.card-header-icon { font-size: 1rem; color: var(--accent); }
.card-body { padding: 1.5rem; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.form-inline { display: flex; gap: 0.75rem; }
.form-inline .form-input { flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
  display: block;
}
.label-hint {
  display: block;
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted);
  letter-spacing: 0;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }
.form-notice {
  background: hsla(217,91%,68%,0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex; gap: 0.5rem; align-items: flex-start;
}
.form-notice i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  font-family: var(--font-sans);
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 2px 12px hsla(217,91%,68%,0.25);
}
.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); }
.btn-danger {
  background: hsla(0,80%,50%,0.15);
  color: var(--danger);
  border: 1px solid hsla(0,80%,50%,0.3);
}
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.85rem 1rem; border-radius: var(--radius);
  font-size: 0.9rem; margin-bottom: 1rem;
}
.alert-error  { background: hsla(0,80%,50%,0.1);  border: 1px solid hsla(0,80%,50%,0.3);  color: hsl(0,80%,70%); }
.alert-success { background: hsla(158,75%,50%,0.1); border: 1px solid hsla(158,75%,50%,0.3); color: hsl(158,75%,65%); }
.alert-info   { background: var(--accent-glow);    border: 1px solid var(--border-accent); color: var(--accent); }
.alert-warning { background: hsla(45,90%,50%,0.1); border: 1px solid hsla(45,90%,50%,0.3); color: hsl(45,90%,70%); }
.flash-msg { margin-bottom: 1.5rem; }

/* ── Steps List ─────────────────────────────────────────────────────────── */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--gradient-hero);
  font-weight: 800; font-size: 0.85rem; color: #fff;
}
.step-body strong { font-size: 0.95rem; display: block; margin-bottom: 0.25rem; }
.step-body p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left; padding: 0.7rem 1rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 0.8rem 1rem; border-bottom: 1px solid rgba(148,163,184,0.06); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: hsla(220,25%,12%,0.5); }
.data-table .row-removed td { opacity: 0.45; }
.empty-cell { text-align: center; color: var(--text-muted); font-style: italic; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: hsla(158,75%,50%,0.15); color: var(--accent2); border: 1px solid hsla(158,75%,50%,0.25); }
.badge-error   { background: hsla(0,80%,50%,0.12);   color: var(--danger);  border: 1px solid hsla(0,80%,50%,0.25); }
.badge-warning { background: hsla(38,95%,60%,0.12);  color: var(--gold);    border: 1px solid hsla(38,95%,60%,0.25); }
.badge-info    { background: var(--accent-glow);     color: var(--accent);  border: 1px solid var(--border-accent); }
.badge-pending { background: hsla(38,95%,60%,0.12);  color: var(--gold);    border: 1px solid hsla(38,95%,60%,0.2); }

/* ── Code Text ───────────────────────────────────────────────────────────── */
.code-text {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: hsla(220,25%,15%,0.8);
  padding: 0.15em 0.5em; border-radius: 4px;
  color: var(--accent2);
}
.mono { font-family: var(--font-mono); font-size: 0.82em; color: var(--text-secondary); }
.accent { color: var(--accent); font-weight: 700; }

/* Source tags */
.source-tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.15em 0.6em; border-radius: 4px; font-weight: 600;
}
.source-api    { background: hsla(217,91%,68%,0.12); color: var(--accent); border: 1px solid var(--border-accent); }
.source-manual { background: hsla(43,95%,60%,0.12);  color: var(--gold);   border: 1px solid hsla(43,95%,60%,0.25); }
.source-scrape { background: hsla(270,80%,65%,0.12); color: hsl(270,80%,70%); border: 1px solid hsla(270,80%,65%,0.25); }

/* ── Codes Grid (status page) ───────────────────────────────────────────── */
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.code-chip {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.code-str { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.code-exp { font-size: 0.75rem; color: var(--text-muted); }
.code-badge { align-self: flex-start; }

/* ── Player Meta ─────────────────────────────────────────────────────────── */
.player-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.meta-val { font-size: 1rem; font-weight: 600; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 1rem; opacity: 0.4; }

/* ── Auth Page ───────────────────────────────────────────────────────────── */
.auth-page {
  display: flex; justify-content: center; align-items: center;
  min-height: 70vh; padding: 2rem;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-icon { font-size: 2.5rem; color: var(--accent); display: block; margin-bottom: 1rem; }
.auth-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.3rem; }
.auth-header p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Admin Layout ────────────────────────────────────────────────────────── */
.admin-layout {
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 80px;
  background: var(--bg-sidebar); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.sidebar-logo {
  font-size: 1rem; font-weight: 700; font-family: var(--font-mono);
  color: var(--accent); padding: 0.25rem 0 0.75rem;
  border-bottom: 1px solid var(--border); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  font-size: 0.875rem; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: var(--bg-card-hover); color: var(--text-primary); text-decoration: none; }
.sidebar-logout { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.admin-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.section-title {
  font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary);
}
.section-title i { color: var(--accent); }

/* Stats grid in admin */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); }
.stat-card-icon { font-size: 1.1rem; }
.stat-card-val { font-size: 1.75rem; font-weight: 800; font-family: var(--font-mono); color: var(--text-primary); }
.stat-card-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

.action-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.action-cell { display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; }


/* ── Responsive Sidebar ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ── Details Dropdown ────────────────────────────────────────────────────── */
.manual-code-details {
  margin-top: 1.5rem;
  border-top: 1px dashed var(--border);
  padding-top: 1.25rem;
}
.manual-code-summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.manual-code-summary:hover {
  color: var(--accent);
}
.manual-code-content {
  margin-top: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.manual-code-content .btn {
  margin-top: 0.5rem;
}

.page-size-btn.active {
  background: var(--accent) !important;
  color: var(--bg-color) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ── Terminal Console ───────────────────────────────────────────────────── */
.terminal-container {
  background: hsl(220, 25%, 4%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.terminal-header {
  background: hsl(220, 22%, 8%);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dots .dot.red { background: hsl(0, 80%, 60%); }
.terminal-dots .dot.yellow { background: hsl(38, 95%, 60%); }
.terminal-dots .dot.green { background: hsl(158, 75%, 58%); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.5;
  padding: 1rem;
  background: hsl(220, 25%, 3%);
  color: hsl(215, 25%, 85%);
  height: 180px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  scroll-behavior: smooth;
}

/* Custom scrollbar for terminal-body */
.terminal-body::-webkit-scrollbar {
  width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
  background: hsl(220, 25%, 3%);
}
.terminal-body::-webkit-scrollbar-thumb {
  background: hsl(220, 20%, 15%);
  border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line.system-line { color: hsl(215, 15%, 55%); }
.terminal-line.error-line { color: hsl(0, 80%, 65%); }
.terminal-line.success-line { color: hsl(158, 75%, 58%); }
.terminal-line.redeem-line { color: hsl(217, 91%, 75%); }
.terminal-line.api-line { color: hsl(43, 95%, 65%); }

/* ── Ko-Fi Link ─────────────────────────────────────────────────────────── */
.kofi-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s, transform 0.2s;
  font-weight: 500;
}
.kofi-link:hover {
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.kofi-link i {
  color: hsl(43, 95%, 60%);
  font-size: 1rem;
}

/* ── Mobile Layout Adjustments ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 0.75rem;
  }
  .logo-text {
    font-size: 1rem;
  }
  .nav-link {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }
  .form-input {
    font-size: 16px; /* Prevents auto-zoom on iOS focus */
  }
}

@media (max-width: 640px) {
  .logo-badge {
    display: none; /* Hide kingdom badge on mobile to save space */
  }
}

@media (max-width: 560px) {
  .nav-link span {
    display: none; /* Show only icons on extra narrow viewports */
  }
  .nav-link {
    padding: 0.45rem 0.6rem;
  }
}


