/* Color Clash — barcha sinflar cc- bilan boshlanadi */
body.in-game { --nav-h: 0px; }
body.in-game .nav, body.in-game .topbar { display: none; }

.cc { display: grid; gap: 12px; margin-top: 4px; }
.cc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cc-ink-red { color: #ff5468; }
.cc-ink-blue { color: #4a90ff; }
.cc-ink-green { color: #2ed47a; }
.cc-ink-yellow { color: #ffd23f; }
.cc-bg-red { background: #ff5468; }
.cc-bg-blue { background: #4a90ff; }
.cc-bg-green { background: #2ed47a; }
.cc-bg-yellow { background: #ffd23f; }

.cc-header { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.cc-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; padding: 0;
  background: var(--surface-2); border: 1px solid var(--border);
}
.cc-icon:disabled { opacity: .4; cursor: not-allowed; }
@media (hover: hover) { .cc-icon:not(:disabled):hover { background: #222e63; } }
.cc-icon:active:not(:disabled) { transform: scale(.96); }
.cc-brand { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.cc-brand svg { flex: none; width: 32px; height: 32px; }
.cc-brand span { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.cc-brand h1 { margin: 0; font-size: 1.2rem; line-height: 1.2; }

.cc-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-stat {
  display: flex; flex-direction: column; align-items: center; padding: 8px 6px; line-height: 1.2;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
}
.cc-stat span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cc-stat strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.cc-meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cc-meter span { display: block; height: 100%; background: var(--lime); transform-origin: left; }
.cc.cc-warn .cc-time { border-color: var(--danger); animation: cc-pulse 1s ease-in-out infinite; }
.cc.cc-warn .cc-time span, .cc.cc-warn .cc-time strong { color: var(--danger); }
.cc.cc-warn .cc-meter span { background: var(--danger); }
@keyframes cc-pulse { 50% { background: rgba(255,122,144,.16); } }

.cc-panel { display: grid; gap: 10px; padding: 18px 16px; }
.cc-panel h2 { font-size: 1.3rem; }
.cc-panel p { color: var(--muted); }
.cc-panel .btn { width: 100%; }
.cc-center { text-align: center; justify-items: center; }
.cc-big { font-size: 4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cc-note { font-size: .9rem; }
.cc-panel .notice { margin: 0; text-align: left; }
.cc-rules { margin: 0; padding-left: 22px; display: grid; gap: 6px; color: var(--text); }

.cc-demo {
  display: grid; gap: 4px; justify-items: center; padding: 14px 10px; text-align: center;
  background: #0e1224; border: 1px solid var(--border); border-radius: 16px;
}
.cc-demo strong { font-size: 2.2rem; line-height: 1.1; letter-spacing: .02em; font-weight: 900; }
.cc-demo span { color: var(--muted); font-size: .95rem; }

.cc-card {
  min-height: 190px; display: grid; align-content: center; justify-items: center; gap: 10px;
  padding: 18px 10px; background: #0e1224; border: 1px solid var(--border); border-radius: 20px;
}
.cc-prompt { color: var(--muted); font-weight: 600; }
.cc-word {
  max-width: 100%; text-align: center; font-weight: 900; letter-spacing: .02em; line-height: 1.1;
  font-size: clamp(2.4rem, 15vw, 4rem); overflow-wrap: anywhere;
}
.cc-feedback {
  min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 800; opacity: 0;
}
.cc-feedback.ok { opacity: 1; color: var(--lime); }
.cc-feedback.bad { opacity: 1; color: var(--danger); }

.cc-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-answer {
  min-width: 0; min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px;
  font-size: 1.05rem; font-weight: 700; text-align: left;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .12s, transform .08s;
}
.cc-answer:active { transform: scale(.97); background: #2a3873; }
@media (hover: hover) { .cc-answer:hover { border-color: var(--violet-soft); } }
.cc-sw { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); }

.cc-results { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin: 0; }
.cc-results div {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
}
.cc-results dt { font-size: .85rem; color: var(--muted); }
.cc-results dd { margin: 0; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (max-width: 340px) {
  .cc-answer { padding: 0 10px; gap: 8px; font-size: 1rem; }
  .cc-brand span { display: none; }
}