/* =============================================================
   Polyglot.fi Core Design System
   Lightweight token + primitive layer for all frontend pages.
   ONLY edit this file to adjust global look & feel.
   ============================================================= */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Palette */
  --icp-blue: #00A7D4;
  --icp-electric: #0066FF;
  --cosmic-purple: #6B46C1;
  --deep-space: #0A0A0F;
  --card-surface: #1A1A2E;
  --glass-overlay: rgba(0, 167, 212, 0.1);
  --glass-hover: rgba(0, 167, 212, 0.2);
  --neon-cyan: #00FFFF;
  --gold-rare: #FFD700;
  --silver-epic: #C0C0C0;
  --stellar-white: #FFFFFF;

  /* Canister Creations brand tokens */
  --btc-orange: #F7931A;
  --btc-orange-glow: rgba(247, 147, 26, 0.35);
  --sol-green: #14F195;
  --sol-pink: #FF6EC7;
  --eth-purple: #8B5CF6;
  --rune-gold: #F59E0B;
  --cc-bear-zone: rgba(247, 147, 26, 0.08);
  --cc-bull-zone: rgba(0, 167, 212, 0.08);
  --cc-shadow-btc: 0 0 32px rgba(247, 147, 26, 0.25);
  --cc-shadow-icp: 0 0 32px rgba(0, 167, 212, 0.25);

  /* Spacing Scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Typography */
  --font-orbitron: 'Orbitron', sans-serif;
  --font-inter: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--icp-blue) 0%, var(--cosmic-purple) 100%);
  --gradient-card: linear-gradient(135deg, var(--card-surface) 0%, #16213E 100%);
  --gradient-text: linear-gradient(135deg, var(--icp-blue) 0%, var(--neon-cyan) 100%);

  /* Motion */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 4px 16px -4px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 0 1px rgba(0,167,212,0.25), 0 4px 18px -2px rgba(0,167,212,0.35);
}

/* Base Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-inter); background: var(--deep-space); color: var(--stellar-white); line-height: 1.55; -webkit-font-smoothing: antialiased; }

/* Utility Primitives */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--spacing-xl); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid { display: grid; gap: var(--spacing-lg); }
.hidden { display: none !important; }
.text-gradient { background: var(--gradient-text); -webkit-background-clip: text; color: transparent; }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; gap: .5ch; font-weight: 600; font-family: var(--font-inter); padding: 0.75rem 1.25rem; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: var(--stellar-white); cursor: pointer; transition: var(--transition-smooth); text-decoration: none; }
.btn:hover { background: rgba(255,255,255,0.08); }
.btn.primary { background: var(--gradient-primary); border: none; box-shadow: var(--shadow-glow); }
.btn.primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn.outline { background: transparent; border: 1px solid var(--icp-blue); }
.btn.outline:hover { background: var(--glass-overlay); }

/* Cards */
.card { background: var(--gradient-card); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-lg); padding: var(--spacing-lg); position: relative; overflow: hidden; box-shadow: var(--shadow-soft); }
.card:hover { border-color: rgba(0,167,212,0.4); }

/* Hero */
.hero { padding: var(--spacing-2xl) 0 var(--spacing-xl); position: relative; }
.hero h1 { font-family: var(--font-orbitron); font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: 1.1; letter-spacing: 1px; }
.hero p { max-width: 680px; margin-top: var(--spacing-md); font-size: 1.125rem; opacity: .85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--spacing-md); margin-top: var(--spacing-xl); }

/* Stat Bar */
.stat-bar { display: flex; flex-wrap: wrap; gap: var(--spacing-sm); margin-top: var(--spacing-xl); }
.stat-pill { --pill-bg: rgba(255,255,255,0.05); display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-radius: 50px; background: var(--pill-bg); font-size: .85rem; letter-spacing: .5px; border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(6px); white-space: nowrap; }
.stat-pill span.value { font-weight: 600; color: var(--neon-cyan); font-family: var(--font-mono); }

/* Section Headings */
.section-heading { font-family: var(--font-orbitron); font-size: 1.75rem; margin-bottom: var(--spacing-md); letter-spacing: .5px; }

/* Feature Grid */
.feature-grid { display: grid; gap: var(--spacing-lg); grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); margin-top: var(--spacing-xl); }
.feature { position: relative; padding: var(--spacing-lg); border: 1px solid rgba(255,255,255,0.08); background: radial-gradient(circle at 20% 20%, rgba(0,167,212,0.15), rgba(255,255,255,0.02)); border-radius: var(--radius-lg); overflow: hidden; min-height: 170px; display: flex; flex-direction: column; gap: var(--spacing-sm); }
.feature:before { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(0,167,212,0.15), rgba(107,70,193,0.15)); opacity: 0; transition: var(--transition-smooth); }
.feature:hover:before { opacity: 1; }
.feature h3 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.feature p { font-size: .8rem; line-height: 1.4; opacity: .75; }
.feature .tag-row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .65rem; letter-spacing: .5px; text-transform: uppercase; padding: 4px 8px; border-radius: 20px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); font-weight: 600; }

/* Navigation Shell */
.main-header { background: rgba(26,26,46,.85); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,167,212,0.3); position: sticky; top:0; z-index:100; }
.navbar { display:flex; align-items:center; justify-content:space-between; padding: var(--spacing-md) var(--spacing-xl); max-width:1400px; margin:0 auto; }
.nav-tabs { display:flex; list-style:none; gap: var(--spacing-sm); background: rgba(0,167,212,0.1); padding: var(--spacing-xs); border-radius: 50px; backdrop-filter: blur(10px); }
.nav-link { display:flex; align-items:center; gap: var(--spacing-xs); padding: var(--spacing-sm) var(--spacing-lg); text-decoration:none; color: var(--stellar-white); border-radius:25px; font-weight:500; white-space:nowrap; transition: var(--transition-smooth); }
.nav-link:hover { background: var(--glass-hover); transform: translateY(-2px); }
.nav-link.active { background: var(--gradient-primary); box-shadow: 0 4px 15px rgba(0,167,212,0.4); }

/* Footer (placeholder for future) */
footer.site-footer { margin-top: var(--spacing-2xl); padding: var(--spacing-xl) 0; font-size:.75rem; opacity:.55; text-align:center; }

/* Wallet Modal Styles */
.wallet-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.wallet-modal-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border: 1px solid rgba(0, 167, 212, 0.3);
}

.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.wallet-modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

.close-btn:hover {
  color: white;
}

.wallet-options {
  display: grid;
  gap: 12px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.wallet-option:hover {
  background: rgba(0, 167, 212, 0.1);
  border-color: rgba(0, 167, 212, 0.3);
  transform: translateY(-2px);
}

.wallet-icon {
  font-size: 2rem;
  min-width: 40px;
}

.wallet-info {
  flex: 1;
}

.wallet-name {
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.wallet-desc {
  font-size: 0.85rem;
  color: #a0a0a0;
}

/* Responsive */
@media (max-width: 840px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .nav-tabs { overflow-x: auto; }
  .feature-grid { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
  .navbar { padding: var(--spacing-sm) var(--spacing-lg); }
}
