/* NeoCoder — umumiy dizayn tizimi (bosh sahifa, Arcade va yangi o'yinlar) */
:root {
  --bg: #070a1a;
  --bg-2: #0d1230;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(165, 180, 252, .16);
  --text: #eef2ff;
  --muted: #94a3b8;
  --accent: #a5b4fc;
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --gold: #facc15;
  --orange: #f59e0b;
  --ok: #22c55e;
  --bad: #ef4444;
  --radius: 20px;
  --mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fon: yumshoq rangli dog'lar + nuqtali to'r */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.bg-fx::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(165, 180, 252, .13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.bg-fx i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: blob 18s ease-in-out infinite alternate; }
.bg-fx i:nth-child(1) { width: 520px; height: 520px; background: #4f46e5; top: -160px; left: -120px; }
.bg-fx i:nth-child(2) { width: 460px; height: 460px; background: #9333ea; top: 30%; right: -160px; animation-delay: -6s; opacity: .35; }
.bg-fx i:nth-child(3) { width: 380px; height: 380px; background: #f59e0b; bottom: -180px; left: 30%; animation-delay: -12s; opacity: .18; }
@keyframes blob { to { transform: translate(60px, 40px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .bg-fx i { animation: none; } }

.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(99, 102, 241, .15); border: 1px solid rgba(99, 102, 241, .35);
  color: #c7d2fe; font-size: .85rem; font-weight: 600;
}
.grad-text {
  background: linear-gradient(90deg, #fff, #c7d2fe 40%, #facc15);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font: 700 .95rem 'Inter', sans-serif; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(99, 102, 241, .5); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--surface-2); border-color: var(--border); box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.btn.gold { background: linear-gradient(135deg, #f59e0b, #facc15); color: #1e1b4b; box-shadow: 0 8px 22px rgba(245, 158, 11, .35); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border); }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; cursor: pointer;
  font: 600 .88rem 'Inter', sans-serif; transition: color .15s, background .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }

.kbd { font: 600 .78rem var(--mono); padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid var(--border); border-bottom-width: 2px; }

.section-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 22px; }

/* Arcade va bosh sahifadagi o'yin kartalari */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; min-height: 190px;
  border-radius: 18px; text-decoration: none; color: var(--text); overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(165, 180, 252, .16), transparent 45%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(165, 180, 252, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.card:hover::after { opacity: 1; }
.card .ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #8b5cf6));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c1, #6366f1) 45%, transparent);
}
.card h3 { font-size: 1.15rem; font-weight: 800; }
.card p { color: var(--muted); font-size: .92rem; line-height: 1.5; flex: 1; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: #cbd5e1; }
.pill.new { background: linear-gradient(135deg, #f59e0b, #facc15); color: #1e1b4b; }
.pill.best { background: rgba(34, 197, 94, .16); color: #86efac; border: 1px solid rgba(34, 197, 94, .35); }
.card .play { position: absolute; top: 22px; right: 22px; color: var(--muted); transition: transform .25s, color .25s; }
.card:hover .play { color: var(--gold); transform: translateX(3px); }
.card.soon { opacity: .55; cursor: default; }
.card.soon:hover { transform: none; box-shadow: none; }

/* Yangi o'yin sahifalari uchun umumiy maket */
.game-page { padding: 28px 0 60px; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.game-head h1 { font-size: clamp(1.5rem, 3.5vw, 2.3rem); font-weight: 900; display: flex; align-items: center; gap: 12px; }
.hud { display: flex; gap: 10px; flex-wrap: wrap; }
.hud .s { padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); min-width: 84px; text-align: center; }
.hud .s b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.hud .s span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.game-input {
  width: 100%; padding: 14px 18px; border-radius: 14px; border: 2px solid var(--border); outline: none;
  background: rgba(0, 0, 0, .35); color: var(--text); font: 600 1.2rem var(--mono); text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.game-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, .2); }
.game-input.err { border-color: var(--bad); animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.start-screen { text-align: center; padding: 40px 20px; }
.start-screen h2 { font-size: 1.6rem; margin-bottom: 8px; }
.start-screen p { color: var(--muted); margin-bottom: 20px; }

@media (max-width: 640px) {
  .card { min-height: 0; }
  .hud .s { min-width: 70px; padding: 6px 10px; }
}
