/* ============================================================
   KEYZIP.PRO — Design Tokens & Reset
   ============================================================ */

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

/* ── COLOR PALETTE ───────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:    #04040A;
  --bg-raised:  #08081200;
  --bg-overlay: #0C0C1A;
  --bg-card:    #0E0E1C;
  --bg-input:   #12121F;
  --bg-hover:   rgba(255,255,255,0.04);
  --bg-active:  rgba(255,255,255,0.07);

  /* Brand colors */
  --blue:        #3B82F6;
  --blue-glow:   rgba(59,130,246,0.25);
  --blue-dim:    rgba(59,130,246,0.12);
  --violet:      #8B5CF6;
  --violet-glow: rgba(139,92,246,0.25);
  --violet-dim:  rgba(139,92,246,0.12);
  --pink:        #EC4899;
  --pink-glow:   rgba(236,72,153,0.25);
  --pink-dim:    rgba(236,72,153,0.12);
  --orange:      #F97316;
  --orange-glow: rgba(249,115,22,0.25);
  --orange-dim:  rgba(249,115,22,0.12);
  --cyan:        #06B6D4;
  --cyan-glow:   rgba(6,182,212,0.25);
  --cyan-dim:    rgba(6,182,212,0.12);
  --green:       #10B981;
  --green-glow:  rgba(16,185,129,0.25);
  --green-dim:   rgba(16,185,129,0.12);
  --yellow:      #F59E0B;
  --red:         #EF4444;

  /* Borders */
  --border:      rgba(255,255,255,0.06);
  --border-md:   rgba(255,255,255,0.10);
  --border-hi:   rgba(255,255,255,0.16);

  /* Text */
  --text-1:  #F1F5F9;
  --text-2:  #CBD5E1;
  --text-3:  #64748B;
  --text-4:  #334155;
  --text-inv:#0F172A;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--blue), var(--violet));
  --grad-warm:  linear-gradient(135deg, var(--orange), var(--pink));
  --grad-cool:  linear-gradient(135deg, var(--cyan), var(--blue));
  --grad-neon:  linear-gradient(135deg, var(--violet), var(--pink));

  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl:36px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 16px 50px rgba(0,0,0,0.6);
  --shadow-xl:  0 32px 80px rgba(0,0,0,0.7);

  /* Easing */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  /* Spacing */
  --nav-h: 64px;
  --cat-h: 52px;
  --content-max: 1440px;
  --feed-max: 1280px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-1);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}
button { cursor: none; }
ul, ol { list-style: none; }
::selection { background: var(--violet); color: #fff; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ── CUSTOM CURSOR ───────────────────────────────────────── */
#cursor-dot, #cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: left, top;
}
#cursor-dot {
  width: 7px; height: 7px;
  background: #fff;
  transition: transform 0.1s;
}
#cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(139,92,246,0.6);
  transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out),
              border-color 0.22s, background 0.22s, left 0.08s linear, top 0.08s linear;
}
body.cursor-hover #cursor-ring {
  width: 52px; height: 52px;
  border-color: var(--violet);
  background: rgba(139,92,246,0.07);
}
body.cursor-click #cursor-dot { transform: translate(-50%,-50%) scale(0.6); }

/* ── TYPOGRAPHY UTILITIES ────────────────────────────────── */
.display-2xl { font-family: var(--font-display); font-size: clamp(48px, 7vw, 96px); font-weight: 900; line-height: 1.0; letter-spacing: -3px; }
.display-xl  { font-family: var(--font-display); font-size: clamp(36px, 5vw, 72px);  font-weight: 900; line-height: 1.05; letter-spacing: -2px; }
.display-lg  { font-family: var(--font-display); font-size: clamp(28px, 4vw, 48px);  font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.display-md  { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px);  font-weight: 800; line-height: 1.15; }
.display-sm  { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.3; }
.text-lg  { font-size: 18px; line-height: 1.6; }
.text-md  { font-size: 16px; line-height: 1.6; }
.text-sm  { font-size: 14px; line-height: 1.5; }
.text-xs  { font-size: 12px; line-height: 1.4; }
.text-2xs { font-size: 11px; line-height: 1.3; }
.mono     { font-family: var(--font-mono); }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-warm-text {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT UTILITIES ────────────────────────────────────── */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.gap-32 { gap: 32px; } .gap-40 { gap: 40px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-full);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, opacity 0.2s;
  cursor: none;
  white-space: nowrap;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 0 24px var(--violet-glow), 0 4px 16px rgba(0,0,0,0.4);
}
.btn-primary:hover { box-shadow: 0 0 40px var(--violet-glow), 0 8px 24px rgba(0,0,0,0.5); }

.btn-secondary {
  background: var(--bg-active);
  color: var(--text-1);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hi); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; font-weight: 700; }
.btn-xl { padding: 16px 36px; font-size: 17px; font-weight: 700; }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all 0.2s;
  cursor: none;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-1); border-color: var(--border-md); }
.btn-icon.sm { width: 30px; height: 30px; font-size: 14px; }
.btn-icon.lg { width: 44px; height: 44px; font-size: 18px; }

/* ── BADGES / PILLS ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: var(--r-full);
  letter-spacing: 0.3px;
}
.badge-blue   { background: var(--blue-dim);   color: #60a5fa; }
.badge-violet { background: var(--violet-dim); color: #a78bfa; }
.badge-pink   { background: var(--pink-dim);   color: #f472b6; }
.badge-orange { background: var(--orange-dim); color: #fb923c; }
.badge-cyan   { background: var(--cyan-dim);   color: #22d3ee; }
.badge-green  { background: var(--green-dim);  color: #34d399; }
.badge-gray   { background: var(--bg-active);  color: var(--text-3); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color 0.2s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
}
.card:hover { border-color: var(--border-md); }

/* ── INPUTS ──────────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text-1);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--text-4); }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-dim); }

.input-group { position: relative; }
.input-group .input { padding-left: 44px; }
.input-group .input-icon {
  position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); font-size: 16px;
  pointer-events: none;
}

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); }
.divider-text {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-4); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── TOAST ───────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 28px; right: 28px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  z-index: 9000;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  padding: 13px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--text-1);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  transform: translateX(120%);
  transition: transform 0.4s var(--ease-spring), opacity 0.4s;
  opacity: 0;
  min-width: 260px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-close { margin-left: auto; cursor: none; color: var(--text-3); font-size: 18px; }

/* ── MODAL OVERLAY ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(4,4,10,0.85);
  backdrop-filter: blur(16px) saturate(150%);
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg-overlay);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  width: 100%; max-width: 520px;
  padding: 40px;
  position: relative;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.4s var(--ease-spring);
}
.modal-backdrop.open .modal-box { transform: scale(1) translateY(0); }
.modal-close-btn {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--bg-active);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 16px; cursor: none;
  transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--bg-hover); color: var(--text-1); }

/* ── COOKIE BANNER ───────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(8,8,18,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-md);
  padding: 16px 24px;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
  z-index: 8000;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}
#cookie-banner.show { transform: translateY(0); }

/* ── AD SLOTS ────────────────────────────────────────────── */
.ad-slot {
  background: rgba(255,255,255,0.015);
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-4);
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  min-height: 90px;
}
.ad-slot-leaderboard { min-height: 90px; }
.ad-slot-rect { min-height: 250px; max-width: 300px; }
.ad-slot-banner { min-height: 60px; }

/* ── SKELETON LOADER ─────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-overlay) 50%, var(--bg-card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--r-sm);
}

/* ── MISC ────────────────────────────────────────────────── */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 600px) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
