/* ============================================================
   BREEZE CLIENT — Design System
   fonts: Syne (headings) + DM Sans (body) via Google Fonts
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:          #060810;
  --surface-1:   #0C101C;
  --surface-2:   #111827;
  --surface-3:   #1C2538;
  --border:      rgba(255,255,255,0.065);
  --border-hi:   rgba(255,255,255,0.13);

  --blue:        #5AAFFF;
  --blue-dim:    rgba(90,175,255,0.12);
  --blue-glow:   rgba(90,175,255,0.28);
  --teal:        #38E5BF;
  --teal-dim:    rgba(56,229,191,0.1);
  --red:         #F87171;
  --yellow:      #FCD34D;
  --green:       #34D399;

  --text-1:  #F0F4FF;
  --text-2:  #8892A4;
  --text-3:  #4A5568;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --nav-h: 68px;
  --max-w: 1200px;

  --shadow-card:    0 2px 20px rgba(0,0,0,.5);
  --shadow-glow-b:  0 0 40px rgba(90,175,255,.18);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-1); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Selection ──────────────────────────────────────────────── */
::selection { background: var(--blue-dim); color: var(--blue); }

/* ── Layout Helpers ─────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }

/* ── Typography ─────────────────────────────────────────────── */
.display-1 { font-family: var(--font-display); font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
.display-2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);   font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
.display-3 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2;  letter-spacing: -0.02em; }
.heading-4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.body-lg   { font-size: 1.125rem; color: var(--text-2); line-height: 1.7; }
.body-md   { font-size: 1rem;     color: var(--text-2); line-height: 1.65; }
.body-sm   { font-size: 0.875rem; color: var(--text-2); }
.mono      { font-family: var(--font-mono); font-size: 0.85em; }
.label     { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.blue      { color: var(--blue); }
.teal      { color: var(--teal); }
.red       { color: var(--red); }
.green     { color: var(--green); }

/* ── Pill / Badge ───────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
  background: var(--blue-dim); color: var(--blue);
  border: 1px solid rgba(90,175,255,0.2);
}
.pill.teal  { background: var(--teal-dim); color: var(--teal); border-color: rgba(56,229,191,.2); }
.pill.red   { background: rgba(248,113,113,.1); color: var(--red); border-color: rgba(248,113,113,.2); }
.pill.green { background: rgba(52,211,153,.1); color: var(--green); border-color: rgba(52,211,153,.2); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 600;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,.05); }

.btn-primary {
  background: var(--blue);
  color: #060810;
  box-shadow: 0 0 0 rgba(90,175,255,0);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(90,175,255,.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-hi);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { color: var(--text-1); background: var(--blue-dim); }

.btn-danger {
  background: rgba(248,113,113,.15);
  color: var(--red);
  border: 1px solid rgba(248,113,113,.25);
}
.btn-danger:hover { background: rgba(248,113,113,.25); }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-card); }
.card-glass {
  background: rgba(12,16,28,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(6,8,16,.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  display: flex; align-items: center;
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  gap: 0;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.15rem; color: var(--text-1);
  margin-right: 40px; flex-shrink: 0;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-link {
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text-1); background: rgba(255,255,255,.05); }
.nav-actions {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
}
.nav-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface-3);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--border-hi);
  transition: border-color 0.2s;
}
.nav-avatar:hover { border-color: var(--blue); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Mobile hamburger */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  padding: 6px; background: transparent; border: none; cursor: pointer;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface-1);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 280px repeat(3, 1fr);
  gap: 48px 40px;
}
.footer-brand p { font-size: 0.875rem; color: var(--text-2); margin-top: 12px; max-width: 240px; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--text-1); margin-bottom: 14px; }
.footer-col a {
  display: block; font-size: 0.875rem; color: var(--text-2);
  padding: 3px 0; transition: color 0.15s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-3); }

/* ── Section Headers ─────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header p { margin-top: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Feature Grid ─────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px; border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: rgba(90,175,255,.3); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--blue-dim);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--blue);
}
.feature-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  overflow: hidden;
}
.stat-item {
  flex: 1; padding: 28px 24px; text-align: center;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
  color: var(--text-1); line-height: 1; display: block;
}
.stat-label { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.form-control {
  background: var(--surface-2); color: var(--text-1);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 11px 14px; font-size: 0.9rem; font-family: var(--font-body);
  transition: border-color 0.2s;
  width: 100%;
}
.form-control:focus { border-color: var(--blue); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 0.78rem; color: var(--text-3); }
.form-error { font-size: 0.78rem; color: var(--red); }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--r-md);
  font-size: 0.875rem; display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid;
}
.alert-info    { background: var(--blue-dim); border-color: rgba(90,175,255,.25); color: var(--blue); }
.alert-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.25); color: var(--green); }
.alert-warning { background: rgba(252,211,77,.08); border-color: rgba(252,211,77,.25); color: var(--yellow); }
.alert-danger  { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); color: var(--red); }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--surface-2); padding: 12px 16px;
  text-align: left; font-size: 0.75rem; font-weight: 600;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em;
}
tbody td { padding: 14px 16px; font-size: 0.875rem; border-top: 1px solid var(--border); color: var(--text-2); }
tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--r-md); }
.tab {
  flex: 1; padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  background: transparent; cursor: pointer; text-align: center;
  transition: all 0.2s;
}
.tab.active { background: var(--surface-3); color: var(--text-1); }
.tab-panel  { display: none; }
.tab-panel.active { display: block; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  max-width: 520px; width: 100%;
  transform: scale(.95); transition: transform 0.2s;
  max-height: 85vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.modal-close {
  background: transparent; border: none; color: var(--text-3);
  cursor: pointer; padding: 4px; transition: color 0.2s;
}
.modal-close:hover { color: var(--text-1); }

/* ── Loading / Spinner ───────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Page Header ─────────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 80px;
  text-align: center;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse at top, var(--blue-glow), transparent 70%);
  pointer-events: none;
}

/* ── Status Dot ──────────────────────────────────────────────── */
.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 6px;
}
.status-dot.ok      { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.warn    { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.status-dot.error   { background: var(--red); box-shadow: 0 0 6px var(--red); }

/* ── Utility ─────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-card); color: var(--text-1);
  font-size: 0.875rem; min-width: 280px;
  animation: slide-in-right 0.3s cubic-bezier(.4,0,.2,1);
  pointer-events: auto;
}
.toast.success { border-color: rgba(52,211,153,.3); }
.toast.error   { border-color: rgba(248,113,113,.3); }
.toast.info    { border-color: rgba(90,175,255,.3); }
@keyframes slide-in-right { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { width: 100%; height: 1px; background: var(--border); margin: 24px 0; }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

/* ── Rarity Colors ───────────────────────────────────────────── */
.rarity-common    { color: var(--text-2); }
.rarity-uncommon  { color: var(--green); }
.rarity-rare      { color: var(--blue); }
.rarity-epic      { color: #A78BFA; }
.rarity-legendary { color: var(--yellow); }

/* ── Auth Gate ───────────────────────────────────────────────── */
.auth-gate {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 64px 24px; gap: 20px;
}
.auth-gate h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.auth-gate p  { color: var(--text-2); max-width: 360px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; gap: 32px; }
  .stats-bar    { flex-wrap: wrap; }
  .stat-item    { min-width: 50%; border-right: none; border-bottom: 1px solid var(--border); }
  .display-1    { font-size: 2.2rem; }
  .section      { padding: 64px 0; }
  .modal        { padding: 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .stat-item { min-width: 100%; }
}

/* ── Mobile Nav ──────────────────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--surface-1); border-bottom: 1px solid var(--border);
  padding: 16px; flex-direction: column; gap: 4px; z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 10px 14px; border-radius: var(--r-sm); font-size: 0.9rem;
  color: var(--text-2); display: block; transition: all 0.15s;
}
.mobile-nav-link:hover { color: var(--text-1); background: rgba(255,255,255,.04); }

/* ── Animations ──────────────────────────────────────────────── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* delay helpers */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
