/* NeoCoder Arena — Kod Himoyachisi, Zombilar, Qal'a Himoyachisi uchun umumiy maket (site.css ustiga) */
body { display: flex; flex-direction: column; }
.game-page { flex: 1; width: min(1120px, 100% - 24px); padding-top: 22px; }
.game-head h1 i { color: var(--ic, var(--accent)); }
.hud .s.meter-s { min-width: 140px; text-align: left; }
.hud .s .meter { margin-top: 6px; }

.arena { display: grid; gap: 12px; }
.stage {
  position: relative; border-radius: 20px; overflow: hidden; background: #05071a;
  border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.stage canvas { display: block; width: 100%; touch-action: manipulation; }

/* Boshlash ekrani — sahna ustida */
.stage .overlay {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 18px; text-align: center;
  background: radial-gradient(ellipse at center, rgba(8, 10, 30, .72), rgba(5, 7, 26, .92));
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.stage .overlay[hidden] { display: none; }
.overlay .card { display: grid; gap: 12px; justify-items: center; max-width: 560px; }
.overlay h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 900; line-height: 1.1; }
.overlay p { color: #cbd5e1; line-height: 1.55; font-size: clamp(.86rem, 2.2vw, 1rem); }
.overlay .tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.overlay .tips span { display: inline-flex; align-items: center; gap: 6px; }
.overlay .best { color: var(--gold); font-weight: 700; font-size: .95rem; }

/* Pauza / banner yozuvi (sahna ustida HTML'da) */
.stage .pause-chip {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 6px 10px; border-radius: 10px; font-size: .78rem; font-weight: 700;
  background: rgba(8, 10, 28, .75); border: 1px solid var(--border); color: var(--muted); pointer-events: none;
}

/* Yozish qatori */
.type-bar { display: flex; gap: 10px; align-items: stretch; }
.type-bar .game-input { flex: 1; min-width: 0; text-align: left; font-size: 1.15rem; padding: 13px 16px; }
.type-bar .game-input:disabled { opacity: .55; }
.type-bar .btn { white-space: nowrap; }

/* Qobiliyat / askar kartalari */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.skill {
  --c1: #6366f1; --c2: #8b5cf6;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: left; font: inherit;
  transition: transform .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.skill .ic {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 6px 16px color-mix(in srgb, var(--c1) 40%, transparent);
}
.skill .tx { min-width: 0; }
.skill b { display: block; font-size: .92rem; line-height: 1.2; }
.skill small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.skill .cost { color: #93c5fd; font-weight: 700; }
.skill .kbd { margin-left: auto; flex: none; }
.skill .cd { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.skill:hover:not(.off) { transform: translateY(-2px); }
.skill.off { opacity: .5; cursor: not-allowed; }
.skill.ready { border-color: color-mix(in srgb, var(--c1) 70%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--c1) 30%, transparent); }
.skill.ready .ic { animation: readyPulse 1.4s ease-in-out infinite; }
@keyframes readyPulse { 50% { transform: scale(1.08); } }
.section-label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 4px 2px -4px; }

/* Shkalalar */
.meter { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .4); overflow: hidden; border: 1px solid rgba(255, 255, 255, .06); }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s; background: var(--mc, linear-gradient(90deg, #3b82f6, #8b5cf6)); }

footer.footer { text-align: center; }

@media (max-width: 640px) {
  .game-page { padding-top: 14px; }
  .hud .s.meter-s { min-width: 110px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .skill { padding: 8px 10px; gap: 8px; }
  .skill .ic { width: 34px; height: 34px; font-size: .95rem; }
  .skill .kbd, .skill small.long { display: none; }
  .type-bar .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .skill.ready .ic { animation: none; } }
