:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7fbff;
  background: #030711;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(44, 235, 213, .13), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(255, 43, 151, .12), transparent 32rem),
    linear-gradient(150deg, #040915 0%, #080c1b 54%, #03050e 100%);
}

button { font: inherit; }
.game-shell { width: min(1180px, 100%); margin: 0 auto; padding: clamp(14px, 3vw, 30px); }
.game-header, .score-strip, footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(93, 230, 255, .24)); }
.brand-lockup h1 { margin: -1px 0 0; font-size: clamp(1.32rem, 4vw, 2rem); font-style: italic; letter-spacing: .12em; }
.eyebrow, .panel-tag { color: #72f6dd; font-size: .65rem; font-weight: 900; letter-spacing: .2em; }
.utility-button {
  padding: 9px 13px;
  border: 1px solid rgba(113, 238, 231, .3);
  border-radius: 9px;
  color: #d9ffff;
  background: rgba(8, 19, 35, .72);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
  cursor: pointer;
}
.utility-button[aria-pressed="false"] { color: #7f899e; border-color: rgba(127, 137, 158, .2); }

.score-strip {
  margin: 18px 0 12px;
  padding: 12px clamp(10px, 2vw, 24px);
  border: 1px solid rgba(101, 236, 223, .16);
  border-radius: 14px;
  background: rgba(7, 13, 29, .86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.score-strip div { display: grid; min-width: 76px; text-align: center; }
.score-strip span { color: #7d8ba2; font-size: .59rem; font-weight: 850; letter-spacing: .15em; }
.score-strip strong { margin-top: 2px; color: #f8fbff; font-size: clamp(1.05rem, 3vw, 1.7rem); font-variant-numeric: tabular-nums; }
#lives { color: #6df4db; letter-spacing: .1em; }
#lives.danger { color: #ff528d; animation: warningPulse .65s ease-in-out infinite alternate; }

.arena {
  position: relative;
  overflow: hidden;
  min-height: min(680px, calc(100vh - 235px));
  border: 1px solid rgba(91, 227, 222, .24);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(46, 235, 207, .1), transparent 42%),
    linear-gradient(145deg, #050b19, #070919 58%, #040713);
  box-shadow: 0 30px 95px rgba(0,0,0,.48), 0 0 55px rgba(27, 217, 210, .055);
}
.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 56%, rgba(29, 219, 199, .07), transparent 32%),
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  pointer-events: none;
}
.arena::after { content: ""; position: absolute; z-index: 1; inset: auto 5% 2%; height: 28%; border: 1px solid rgba(74, 239, 214, .12); border-radius: 50%; background: radial-gradient(ellipse, rgba(57, 135, 178, .12), transparent 68%); transform: perspective(330px) rotateX(66deg); pointer-events: none; }
.arena-topbar {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 19px;
  border-bottom: 1px solid rgba(111, 225, 224, .14);
  background: rgba(7, 13, 28, .96);
}
.channel-name { display: flex; align-items: center; gap: 9px; }
.channel-name strong { font-size: .9rem; }
.channel-name > span:last-child { color: #7f8ca3; font-size: .72rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ef2b4; box-shadow: 0 0 13px #5ef2b4; }
.threat-meter { display: flex; align-items: center; gap: 9px; }
.threat-meter > span { color: #8794aa; font-size: .57rem; font-weight: 900; letter-spacing: .14em; }
.threat-meter > div { width: 110px; height: 6px; overflow: hidden; border-radius: 99px; background: #1a2132; }
.threat-meter i { display: block; width: 18%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #64efd7, #ffd85f, #ff3f82); transition: width .18s ease; }

.chat-field { position: absolute; inset: 64px 0 0; overflow: hidden; }
.moderation-core { position: absolute; z-index: 0; left: 50%; top: 47%; display: grid; width: 230px; height: 230px; place-items: center; border: 1px solid rgba(94, 241, 218, .12); border-radius: 50%; color: rgba(118, 245, 225, .34); background: radial-gradient(circle, rgba(46, 214, 197, .1), transparent 67%); transform: translate(-50%, -50%); box-shadow: 0 0 80px rgba(47, 218, 204, .08), inset 0 0 40px rgba(74, 222, 217, .06); }
.core-mark { display: grid; width: 88px; height: 88px; place-items: center; border: 1px solid rgba(119, 243, 225, .36); border-radius: 50%; color: rgba(181, 255, 245, .42); background: radial-gradient(circle at 38% 30%, rgba(65, 178, 198, .25), rgba(4, 13, 28, .7)); box-shadow: 0 0 24px rgba(69, 237, 214, .13); font: italic 900 2.25rem Georgia, serif; }
.moderation-core > span { position: absolute; bottom: 23px; font-size: .48rem; font-weight: 900; letter-spacing: .2em; }
.core-orbit, .core-orbit i { position: absolute; inset: 17px; border: 1px solid rgba(105, 234, 221, .18); border-radius: 50%; animation: orbit 12s linear infinite; }
.core-orbit i { inset: 15px; border-style: dashed; animation-duration: 8s; animation-direction: reverse; }
.core-orbit i:nth-child(2) { inset: 36px; animation-duration: 6s; }.core-orbit i:nth-child(3) { inset: -9px; border-color: transparent rgba(166, 85, 255, .22); }
.signal-rail { position: absolute; z-index: 1; top: 12%; bottom: 22%; display: flex; width: 27px; align-items: center; justify-content: center; gap: 4px; flex-direction: column; opacity: .38; }
.signal-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, rgba(100, 237, 225, .65), transparent); }
.signal-rail i { position: relative; width: calc(5px + var(--bar, 1) * 2px); height: 3px; background: #6deddb; box-shadow: 0 0 9px #6deddb; animation: railPulse 1.8s ease-in-out infinite alternate; }
.signal-rail i:nth-child(2) { width: 17px; animation-delay: -.3s; }.signal-rail i:nth-child(3) { width: 10px; animation-delay: -.6s; }.signal-rail i:nth-child(4) { width: 21px; animation-delay: -.9s; }.signal-rail i:nth-child(5) { width: 13px; animation-delay: -1.2s; }
.rail-left { left: 16px; }.rail-right { right: 16px; transform: scaleX(-1); }
.scan-lines { position: absolute; inset: 0; opacity: .18; background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(110,239,229,.04) 7px); pointer-events: none; }
.shield-zone {
  position: absolute;
  z-index: 2;
  inset: auto 0 7%;
  height: 12%;
  border-top: 1px solid rgba(88, 246, 213, .7);
  background: linear-gradient(180deg, rgba(68, 241, 208, .08), rgba(41, 183, 241, .02));
  box-shadow: 0 -8px 36px rgba(72, 239, 213, .08);
  pointer-events: none;
}
.shield-zone span { position: absolute; right: 18px; top: 11px; color: rgba(126, 255, 230, .68); font-size: .56rem; font-weight: 950; letter-spacing: .18em; }
.shield-zone i { position: absolute; left: 0; top: -1px; width: 14%; height: 2px; background: #8affea; box-shadow: 0 0 18px #59f5d5; animation: shieldScan 2.2s linear infinite; }

.chat-card {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: min(620px, calc(100% - 30px));
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid rgba(131, 159, 193, .22);
  border-radius: 14px;
  color: #edf5ff;
  text-align: left;
  background: linear-gradient(110deg, rgba(15, 27, 49, .97), rgba(9, 16, 35, .98));
  box-shadow: 0 13px 30px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.055), inset 3px 0 0 color-mix(in srgb, var(--avatar) 60%, transparent);
  cursor: crosshair;
  touch-action: manipulation;
  will-change: transform;
}
.chat-card:hover, .chat-card:focus-visible { border-color: rgba(111, 244, 224, .68); outline: 2px solid rgba(111, 244, 224, .24); outline-offset: 2px; }
.chat-card .avatar { position: relative; display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid color-mix(in srgb, var(--avatar) 68%, #fff); border-radius: 50%; color: #06131c; background: radial-gradient(circle at 34% 28%, #fff, var(--avatar) 26%, color-mix(in srgb, var(--avatar) 66%, #152039)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--avatar) 10%, transparent), 0 0 14px color-mix(in srgb, var(--avatar) 26%, transparent); font-size: .72rem; font-weight: 950; }
.chat-card .avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border: 2px solid #0d172d; border-radius: 50%; background: #63f1b8; box-shadow: 0 0 8px #63f1b8; }
.chat-copy { min-width: 0; }
.chat-copy strong { display: block; overflow: hidden; color: #a6b7cc; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-copy span { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: clamp(.75rem, 2.1vw, .89rem); line-height: 1.32; }
.key-hint { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(159, 179, 205, .22); border-radius: 7px; color: #8e9db2; font-size: .63rem; font-weight: 900; }
.chat-card.caught { border-color: #68f1d8; background: rgba(13, 73, 70, .93); animation: caught .3s ease forwards; pointer-events: none; }
.chat-card.wrong { border-color: #ff4d87; background: rgba(86, 17, 47, .93); animation: wrong .38s ease forwards; pointer-events: none; }
.chat-card.passed { animation: passed .3s ease forwards; pointer-events: none; }

.game-panel {
  position: absolute;
  z-index: 10;
  inset: 50% auto auto 50%;
  width: min(590px, calc(100% - 30px));
  transform: translate(-50%, -50%);
  padding: clamp(23px, 5vw, 42px);
  border: 1px solid rgba(103, 237, 219, .28);
  border-radius: 20px;
  text-align: center;
  background: rgba(5, 10, 23, .95);
  box-shadow: 0 28px 80px rgba(0,0,0,.64), inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter: blur(14px);
}
.game-panel::before { content: ""; position: absolute; left: 15%; right: 15%; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, #6ff1da, transparent); box-shadow: 0 0 18px rgba(86, 236, 215, .55); }
#result.game-panel { background: radial-gradient(circle at 50% 0, rgba(83, 246, 208, .13), transparent 48%), rgba(5, 10, 23, .97); }
#result.game-panel::after { content: "MODERATION LOG SEALED"; display: block; width: max-content; margin: 17px auto -20px; color: rgba(111, 241, 222, .46); font-size: .5rem; font-weight: 900; letter-spacing: .19em; }
.shield-emblem { position: relative; display: grid; width: 75px; height: 82px; margin: 0 auto 13px; place-items: center; color: #c5fff5; background: linear-gradient(155deg, rgba(102, 241, 217, .24), rgba(17, 53, 75, .3)); clip-path: polygon(50% 0, 92% 17%, 84% 72%, 50% 100%, 16% 72%, 8% 17%); filter: drop-shadow(0 0 18px rgba(83, 237, 213, .25)); }
.shield-emblem::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(123, 245, 226, .58); clip-path: inherit; }
.shield-emblem span { position: relative; z-index: 2; font: italic 900 1.65rem Georgia, serif; text-shadow: 0 0 12px #62f2d8; }
.shield-emblem i { position: absolute; z-index: 1; width: 64%; height: 1px; background: linear-gradient(90deg, transparent, #6ff3de, transparent); transform: rotate(35deg); }.shield-emblem i:last-child { transform: rotate(-35deg); }
.game-panel h2 { margin: 10px 0 12px; font-size: clamp(1.5rem, 5vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; }
.game-panel h2 em { color: #6ff2d7; font-style: normal; }
.game-panel > p { max-width: 470px; margin: 0 auto 20px; color: #a8b4c7; font-size: .9rem; line-height: 1.55; }
.rule-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin: 0 auto 22px; color: #c9d4e3; font-size: .75rem; font-weight: 750; }
.rule-row span { display: flex; align-items: center; gap: 7px; }
.rule-icon { position: relative; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; font-style: normal; font-weight: 950; }
.rule-icon.danger { color: #ff6496; background: rgba(255, 67, 128, .13); }
.rule-icon.safe { color: #6ef1d7; background: rgba(73, 239, 207, .12); }
.rule-icon::before, .rule-icon::after { content: ""; position: absolute; width: 11px; height: 2px; border-radius: 2px; background: currentColor; }
.rule-icon.danger::before { transform: rotate(45deg); }.rule-icon.danger::after { transform: rotate(-45deg); }
.rule-icon.safe::before { width: 6px; transform: translate(-3px,2px) rotate(45deg); }.rule-icon.safe::after { width: 11px; transform: translate(3px,0) rotate(-48deg); }
.primary-button {
  padding: 14px 20px;
  border: 0;
  border-radius: 11px;
  color: #02100f;
  background: linear-gradient(105deg, #8bfa58, #58f0d2 50%, #52d7ff);
  box-shadow: 0 12px 34px rgba(71, 229, 207, .2);
  font-size: .77rem;
  font-weight: 950;
  letter-spacing: .08em;
  cursor: pointer;
}
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.game-panel small { display: block; margin-top: 12px; color: #66748b; font-size: .65rem; }
.hidden { display: none; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 22px; }
.result-grid div { display: grid; gap: 2px; padding: 10px 5px; border: 1px solid rgba(119, 233, 220, .12); border-radius: 10px; background: rgba(255,255,255,.025); }
.result-grid strong { color: #74f1da; font-size: 1.35rem; }
.result-grid span { color: #7f8ca2; font-size: .62rem; }
.callout { position: absolute; z-index: 12; left: 50%; top: 22%; opacity: 0; transform: translate(-50%, -8px) scale(.94); color: #fff; font-size: clamp(1.1rem, 4vw, 2rem); font-weight: 1000; font-style: italic; letter-spacing: .07em; text-shadow: 0 0 18px var(--callout, #53efd2), 0 3px 0 rgba(0,0,0,.4); pointer-events: none; transition: opacity .14s ease, transform .18s ease; }
.callout.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.how-to { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.how-to div { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid rgba(116, 233, 223, .1); border-radius: 11px; background: rgba(7, 13, 27, .7); }
.how-to strong { color: #6ff1d9; font-size: .76rem; }
.how-to span { color: #8794a8; font-size: .69rem; }
footer { padding: 14px 3px 0; color: #758299; font-size: .7rem; }
footer p { margin: 0; }
footer strong { color: #aab7c9; }

@keyframes shieldScan { from { transform: translateX(-100%); } to { transform: translateX(715%); } }
@keyframes warningPulse { to { text-shadow: 0 0 16px rgba(255, 54, 119, .85); } }
@keyframes caught { to { opacity: 0; transform: translate3d(var(--x), var(--y), 0) scale(.82); filter: brightness(1.9); } }
@keyframes wrong { 25% { transform: translate3d(calc(var(--x) - 8px), var(--y), 0); } 65% { transform: translate3d(calc(var(--x) + 8px), var(--y), 0); } to { opacity: 0; } }
@keyframes passed { to { opacity: 0; filter: brightness(1.45); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes railPulse { to { opacity: .25; transform: scaleX(.55); } }

@media (max-width: 680px) {
  .game-shell { padding: 10px; }
  .brand-lockup img { width: 43px; height: 43px; }
  .game-header { gap: 8px; }
  .utility-button { padding: 8px 9px; font-size: .61rem; }
  .score-strip { gap: 2px; margin-top: 12px; padding-inline: 7px; }
  .score-strip div { min-width: 0; }
  .score-strip span { font-size: .48rem; letter-spacing: .08em; }
  .score-strip strong { font-size: .97rem; }
  .arena { min-height: 610px; border-radius: 16px; }
  .arena-topbar { height: 55px; padding: 0 12px; }
  .chat-field { inset-block-start: 55px; }
  .channel-name > span:last-child { display: none; }
  .threat-meter > span { display: none; }
  .threat-meter > div { width: 72px; }
  .chat-card { grid-template-columns: 34px minmax(0, 1fr) 23px; gap: 8px; width: calc(100% - 18px); min-height: 62px; padding: 8px 9px; border-radius: 12px; }
  .chat-card .avatar { width: 34px; height: 34px; font-size: .68rem; }
  .chat-copy span { font-size: .72rem; }
  .game-panel { width: calc(100% - 20px); padding: 20px 14px; }
  .shield-emblem { width: 52px; height: 57px; margin-bottom: 7px; }
  .game-panel > p { font-size: .78rem; line-height: 1.45; }
  .game-panel small { font-size: .58rem; }
  .result-grid strong { font-size: 1.1rem; }
  .how-to { grid-template-columns: 1fr; gap: 5px; }
  .how-to div { padding: 8px 11px; }
  footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
