/* ==========================================================================
   COINLINK — DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep obsidian slate, amber gold (#F59E0B) & electric emerald (#10B981)
   100% self-contained typography & styling. Zero external telemetry.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-main: #0a0c10;
  --bg-card: #11141c;
  --bg-elevated: #161a25;
  --bg-glass: rgba(17, 20, 28, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.45);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-gold-glow: rgba(245, 158, 11, 0.2);

  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.2);
  --accent-red: #ef4444;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

[hidden] { display: none !important; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-main);
  line-height: 1.5;
  position: relative;
}

/* Subtle cryptographic geometric dot lattice */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: clamp(16px, 3.5vw, 36px);
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.95rem; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.4rem; }
.text-2xl { font-size: 1.8rem; }
.text-3xl { font-size: clamp(2rem, 3.5vw, 2.75rem); }
.text-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.gold { color: var(--accent-gold); }
.green { color: var(--accent-green); }
.red { color: var(--accent-red); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-faint {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 0 16px var(--accent-gold-glow);
}
.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.68rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Integrated Header CA Pill (Single Row) */
.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 6px 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.ca-pill:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}
.ca-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold);
  display: inline-block;
  opacity: 0.9;
}
.ca-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ca-val {
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 500;
}
.ca-copy-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: var(--transition);
}
.ca-copy-action:hover, .ca-pill:hover .ca-copy-action {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--accent-gold-hover);
}

/* ==========================================================================
   COINLINK BRAND THEME HERO MOTIF (Matching official logo artwork)
   ========================================================================== */
.hero-brand-motif {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 22px;
}
.motif-svg {
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.motif-svg:hover {
  transform: scale(1.04);
}

/* Primary / Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-elevated);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Tabs Group */
.tab-group {
  display: inline-flex;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  gap: 4px;
}
.tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}
.tab-btn:hover {
  color: var(--text-main);
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Hero Section */
.hero {
  padding: 64px 0 40px;
  text-align: center;
  position: relative;
}
.hero-headline {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 16px 0;
  max-width: 860px;
  margin-inline: auto;
}
.hero-highlight {
  background: linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Stat strip banner */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 40px 0 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}
.stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: color 0.3s ease;
}

/* Layout split (Launch Form & Interactive Swapper) */
.launch-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  margin: 40px 0;
}
@media (max-width: 900px) {
  .launch-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.card-header {
  margin-bottom: 22px;
}
.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* Form inputs */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-glow);
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 5px;
}

/* Currency Pairing Visualizer */
.pairing-visualizer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 18px 0;
  gap: 12px;
}
.pair-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex: 1;
}
.pair-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.pair-icon.quote {
  background: var(--accent-green);
}
.pair-chain {
  font-size: 1.4rem;
  color: var(--accent-gold);
}

/* Examples Showcase Grid */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
  position: relative;
}
.example-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.example-stats {
  display: flex;
  justify-content: space-between;
  background: var(--bg-elevated);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 14px;
}

/* Terminal Directory & Coins Table */
.coins-section {
  margin: 50px 0 80px;
}
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  min-width: 280px;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.coins-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.coins-table th {
  padding: 16px 20px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}
.coins-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  transition: background-color 0.4s ease;
}
.coins-table tr:hover td {
  background: rgba(245, 158, 11, 0.02);
}

/* Live Price Flash Animations */
.flash-up {
  background-color: rgba(16, 185, 129, 0.22) !important;
  color: #10b981 !important;
}
.flash-down {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #ef4444 !important;
}

/* Interactive Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  padding: 28px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 0.88rem;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
