[hidden] { display: none !important; }
:root {
  --bg: #120f2e;
  --bg2: #1c1846;
  --card: #241f57;
  --line: rgba(255, 255, 255, .12);
  --text: #fff7f0;
  --muted: #c9c3ef;
  --prot: #ff3d6e;
  --prot2: #ff8fab;
  --pol: #3a7bff;
  --pol2: #8fb6ff;
  --gold: #ffd23f;
  --fr-blue: #0055a4;
  --fr-red: #ef4135;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Fredoka', system-ui, sans-serif; color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 61, 110, .35), transparent 60%),
    radial-gradient(1000px 700px at -10% 10%, rgba(58, 123, 255, .35), transparent 60%),
    linear-gradient(180deg, #2a1f5c 0%, var(--bg) 45%, #0d0b22 100%);
  background-color: var(--bg);
  min-height: 100vh; overflow-x: hidden;
}
body.playing { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: 'Bungee', 'Fredoka', sans-serif; font-weight: 400; margin: 0; letter-spacing: .5px; }
.tricolor { display: flex; height: 6px; position: sticky; top: 0; z-index: 30; }
.tricolor i { flex: 1; } .tricolor i:nth-child(1) { background: var(--fr-blue); } .tricolor i:nth-child(2) { background: #fff; } .tricolor i:nth-child(3) { background: var(--fr-red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font: 600 16px 'Fredoka', sans-serif; color: #fff; text-decoration: none; padding: 11px 20px; border-radius: 14px;
  background: linear-gradient(135deg, var(--prot), #ff7a45); box-shadow: 0 6px 0 #a31545, 0 10px 24px rgba(255, 61, 110, .35);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a31545; }
.btn.big { font-size: 19px; padding: 14px 26px; }
.btn.ghost { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.btn.mini { padding: 7px 12px; font-size: 14px; box-shadow: 0 4px 0 #a31545; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.nav { position: sticky; top: 6px; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 12px max(16px, calc(50% - 600px)); background: rgba(18, 15, 46, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: 'Bungee'; font-size: 20px; }
.brand img { width: 36px; height: 36px; }
.nav nav { display: flex; gap: 18px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav nav a:hover { color: #fff; }
.buy-nav { padding: 8px 16px; font-size: 15px; }

main { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
section { padding: 70px 0 20px; }
section h2 { font-size: clamp(28px, 4vw, 42px); text-align: center; }
.sub { text-align: center; color: var(--muted); margin: 10px auto 30px; max-width: 640px; font-size: 18px; }

.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding-top: 50px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-weight: 500; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3d3d; box-shadow: 0 0 0 0 rgba(255, 61, 61, .7); animation: pulse 1.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 61, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 61, 0); } }
.hero h1 { font-size: clamp(40px, 6.4vw, 78px); line-height: 1; margin: 18px 0; }
.t-prot { color: var(--prot); text-shadow: 0 5px 0 #8f1239; display: block; }
.t-pol { color: var(--pol); text-shadow: 0 5px 0 #173d8f; display: block; }
.vs { font-size: .5em; color: var(--gold); display: block; margin: 6px 0; }
.lead { font-size: 19px; line-height: 1.55; color: #ece7ff; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.ca-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; max-width: 520px; }
.label { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.ca-row { display: flex; gap: 10px; align-items: center; }
.ca-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0, 0, 0, .3); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.ca-card .buy { margin-top: 12px; width: 100%; }
.hero-art { position: relative; }
.hero-art img { width: 100%; display: block; border-radius: 26px; border: 4px solid #fff; box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 10px 10px 0 var(--prot), -10px -10px 0 var(--pol); transform: rotate(1.5deg); background: #2a2460; aspect-ratio: 16/10; object-fit: cover; }
.sticker { position: absolute; font-family: 'Bungee'; font-size: 14px; padding: 10px 14px; border-radius: 12px; color: #1d1a3a; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.s1 { left: -14px; bottom: 26px; background: var(--gold); transform: rotate(-4deg); }
.s2 { right: -8px; top: -14px; background: #fff; transform: rotate(5deg); }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.side { position: relative; text-align: left; border: 0; cursor: pointer; color: #fff; font-family: inherit; padding: 30px; border-radius: 26px; overflow: hidden; transition: transform .15s; }
.side:hover { transform: translateY(-5px) rotate(-.4deg); }
.side.protest { background: linear-gradient(150deg, #ff3d6e, #ff8c42 70%, #ffd23f); box-shadow: 0 10px 0 #a31545, 0 24px 50px rgba(255, 61, 110, .35); }
.side.police { background: linear-gradient(150deg, #1d3fa8, #3a7bff 60%, #6fd3ff); box-shadow: 0 10px 0 #142f7a, 0 24px 50px rgba(58, 123, 255, .35); }
.side::after { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.side-tag { display: inline-block; background: rgba(0, 0, 0, .25); padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.side h3 { font-size: 40px; margin: 10px 0 14px; text-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.side ul { list-style: none; padding: 0; margin: 0 0 22px; font-size: 17px; line-height: 1.5; }
.side li { padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, .3); }
.side li b { font-weight: 700; }
.side .btn { background: #fff; color: #1d1a3a; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.note { text-align: center; color: var(--muted); margin-top: 20px; }

.war { display: grid; grid-template-columns: 180px 1fr 180px; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; }
.war-side { text-align: center; }
.war-side span { font-family: 'Bungee'; font-size: 18px; display: block; }
.war-side b { font-size: 34px; display: block; margin: 4px 0; }
.war-side small { color: var(--muted); }
.war-side.protest span, .war-side.protest b { color: var(--prot2); }
.war-side.police span, .war-side.police b { color: var(--pol2); }
.war-bar { position: relative; height: 36px; border-radius: 999px; background: linear-gradient(90deg, var(--pol), #6fa0ff); overflow: hidden; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35); }
.war-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: linear-gradient(90deg, #ff8c42, var(--prot)); transition: width 1s; border-right: 4px solid #fff; }
.war-mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: rgba(255, 255, 255, .5); }
.war-lead { text-align: center; font-family: 'Bungee'; font-size: 20px; color: var(--gold); margin-top: 22px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.step span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-family: 'Bungee'; background: linear-gradient(135deg, var(--prot), var(--pol)); }
.step h4 { font-size: 19px; margin: 14px 0 8px; }
.step p { color: var(--muted); margin: 0; line-height: 1.5; }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; margin-top: 28px; color: var(--muted); }
kbd { font: 600 13px 'Fredoka'; background: #fff; color: #1d1a3a; padding: 4px 8px; border-radius: 7px; box-shadow: 0 3px 0 #9a95c4; }

.board ol { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; }
.board li { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin-bottom: 10px; font-size: 18px; }
.board li .r { font-family: 'Bungee'; width: 30px; color: var(--gold); }
.board li .n { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .team { font-size: 13px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.board li .team.protest { background: rgba(255, 61, 110, .25); color: var(--prot2); }
.board li .team.police { background: rgba(58, 123, 255, .25); color: var(--pol2); }
.board li.empty { justify-content: center; color: var(--muted); }

.foot { text-align: center; color: var(--muted); padding: 60px 16px 40px; font-size: 14px; max-width: 760px; margin: 0 auto; }

/* ---------- game overlay ---------- */
.game { position: fixed; inset: 0; z-index: 100; background: #2a2460; user-select: none; -webkit-user-select: none; touch-action: none; }
.game[hidden] { display: none; }
.game canvas { width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; font-family: 'Fredoka'; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .45); }
.h-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: flex-start; }
.h-team { display: flex; align-items: center; gap: 8px; background: rgba(15, 12, 40, .6); padding: 8px 12px; border-radius: 14px; }
.h-tn { font-family: 'Bungee'; font-size: 13px; }
.h-team b { font-family: 'Bungee'; font-size: 20px; min-width: 34px; text-align: center; }
.h-bar { width: 140px; height: 12px; background: rgba(255, 255, 255, .15); border-radius: 99px; overflow: hidden; }
.h-bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s; }
.h-team.protest .h-bar i { background: linear-gradient(90deg, #ff8c42, var(--prot)); }
.h-team.police { flex-direction: row; }
.h-team.police .h-bar { transform: scaleX(-1); }
.h-team.police .h-bar i { background: linear-gradient(90deg, #6fd3ff, var(--pol)); }
.h-team.protest .h-tn, .h-team.protest b { color: var(--prot2); }
.h-team.police .h-tn, .h-team.police b { color: var(--pol2); }
.h-mid { text-align: center; background: rgba(15, 12, 40, .6); padding: 6px 14px 8px; border-radius: 14px; min-width: 200px; }
#h-time { font-family: 'Bungee'; font-size: 24px; }
#h-zone { font-size: 13px; color: #e6e1ff; }
.h-zbar { position: relative; height: 6px; background: rgba(255, 255, 255, .2); border-radius: 9px; margin-top: 5px; overflow: hidden; }
.h-zbar i { position: absolute; top: 0; bottom: 0; }
.h-feed { position: absolute; top: 90px; right: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 15px; }
.h-feed div { background: rgba(15, 12, 40, .65); padding: 5px 10px; border-radius: 10px; transition: opacity .8s; }
.h-feed div.fade { opacity: 0; }
.h-cross { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); }
.h-cross i { position: absolute; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, .8); border-radius: 2px; }
.h-cross i:nth-child(1) { left: 12px; top: 0; width: 2px; height: 8px; }
.h-cross i:nth-child(2) { left: 12px; bottom: 0; width: 2px; height: 8px; }
.h-cross i:nth-child(3) { top: 12px; left: 0; height: 2px; width: 8px; }
.h-cross i:nth-child(4) { top: 12px; right: 0; height: 2px; width: 8px; }
.h-cross.hit i { background: var(--gold); }
.h-cross.hit { transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }
.h-msg { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.8); font-family: 'Bungee'; font-size: 44px; text-align: center; opacity: 0; transition: opacity .25s, transform .25s; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.h-msg small { display: block; font-family: 'Fredoka'; font-size: 20px; margin-top: 8px; }
.h-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.h-float { position: absolute; left: 50%; top: 42%; }
.f-item { position: absolute; transform: translateX(-50%); font-family: 'Bungee'; font-size: 30px; animation: floatUp 1.1s ease-out forwards; white-space: nowrap; -webkit-text-stroke: 1px rgba(0, 0, 0, .4); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.h-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.h-hp { background: rgba(15, 12, 40, .6); padding: 8px 12px; border-radius: 14px; width: 230px; }
.h-hp span { font-size: 13px; color: #e6e1ff; }
.h-hpbar { height: 14px; background: rgba(255, 255, 255, .15); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.h-hpbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #06d6a0, #b8f35a); transition: width .15s; }
.h-hp.hurt { background: rgba(255, 61, 110, .55); }
.h-weps { display: flex; gap: 8px; pointer-events: auto; }
.w-slot { position: relative; overflow: hidden; background: rgba(15, 12, 40, .65); border: 2px solid rgba(255, 255, 255, .15); border-radius: 14px; padding: 8px 14px 8px 34px; min-width: 120px; cursor: pointer; }
.w-slot.on { border-color: var(--gold); background: rgba(255, 210, 63, .2); }
.w-slot.low .w-name { color: #ff8fab; }
.w-key { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 6px; background: #fff; color: #1d1a3a; font-size: 13px; font-weight: 700; display: grid; place-items: center; text-shadow: none; }
.w-name { font-weight: 600; font-size: 15px; position: relative; z-index: 1; }
.w-cd { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--gold); width: 0; }
.h-stats { display: flex; flex-direction: column; gap: 4px; background: rgba(15, 12, 40, .6); padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.h-stats b { font-family: 'Bungee'; font-size: 16px; margin-left: 4px; }
.h-splats { position: absolute; inset: 0; overflow: hidden; }
.s-blob { position: absolute; border-radius: 47% 53% 42% 58% / 55% 45% 55% 45%; opacity: .85; transform: translate(-50%, -50%); transition: opacity 1s; filter: blur(1px); }
.s-blob.fade { opacity: 0; }
.h-gas { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(230, 235, 240, .15), rgba(220, 228, 236, .85)); opacity: 0; transition: opacity .5s; }
.h-gas.on { opacity: 1; }
.h-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.h-hint { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); background: rgba(15, 12, 40, .7); padding: 8px 16px; border-radius: 12px; opacity: 0; transition: opacity .5s; white-space: nowrap; }
.h-hint.show { opacity: 1; }
.h-pause, .end { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 8, 30, .6); backdrop-filter: blur(4px); pointer-events: auto; z-index: 5; }
.h-pause[hidden], .end[hidden] { display: none; }
.p-card, .end-card { background: linear-gradient(160deg, #2c2670, #1c1846); border: 2px solid rgba(255, 255, 255, .15); border-radius: 26px; padding: 28px; width: min(440px, calc(100vw - 32px)); text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.p-card h3 { font-size: 30px; }
.p-keys { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.end-tag { align-self: center; font-family: 'Bungee'; font-size: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.end-tag.win { background: var(--gold); color: #1d1a3a; }
.end-tag.lose { background: rgba(255, 255, 255, .15); }
.end-card h3 { font-size: 30px; }
.e-points { font-family: 'Bungee'; font-size: 34px; display: flex; gap: 14px; justify-content: center; align-items: center; }
.e-points .p { color: var(--prot2); } .e-points .c { color: var(--pol2); } .e-points .dash { font-size: 14px; color: var(--muted); }
.e-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.e-stats div { background: rgba(0, 0, 0, .25); border-radius: 14px; padding: 10px 4px; }
.e-stats b { font-family: 'Bungee'; font-size: 22px; display: block; }
.e-stats span { color: var(--muted); font-size: 13px; }
.e-form { display: flex; gap: 8px; }
.e-form[hidden] { display: none; }
.e-form input { flex: 1; min-width: 0; font: 500 16px 'Fredoka'; padding: 11px 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .3); color: #fff; }
.e-msg { margin: 0; min-height: 20px; color: var(--gold); }
.e-actions { display: flex; flex-direction: column; gap: 10px; }

/* touch */
.h-touch { position: absolute; inset: 0; pointer-events: none; }
.h-touch[hidden] { display: none; }
.t-joy { position: absolute; left: 30px; bottom: 120px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .3); pointer-events: auto; }
.t-joy i { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.t-btn { position: absolute; pointer-events: auto; border: 0; border-radius: 50%; font: 700 14px 'Bungee'; color: #fff; }
.t-fire { right: 30px; bottom: 130px; width: 92px; height: 92px; background: rgba(255, 61, 110, .75); }
.t-jump { right: 136px; bottom: 120px; width: 62px; height: 62px; background: rgba(255, 255, 255, .25); font-size: 11px; }
.t-wep { right: 40px; bottom: 236px; width: 62px; height: 62px; background: rgba(255, 210, 63, .6); font-size: 11px; color: #1d1a3a; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .sides { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .war { grid-template-columns: 1fr 1fr; }
  .war-bar { grid-column: 1 / -1; order: 3; }
  .nav nav { display: none; }
  .buy-nav { margin-left: auto; }
  .h-bar { width: 60px; }
  .h-mid { min-width: 130px; }
  .h-tn { display: none; }
  .h-hp { width: 150px; }
  .h-stats { display: none; }
  .w-slot { min-width: 0; padding: 6px 8px 6px 30px; }
  .w-name { font-size: 12px; }
  .h-bottom { bottom: 8px; }
  .h-feed { top: 80px; font-size: 12px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .side { padding: 22px; }
  .side h3 { font-size: 32px; }
  .sticker { display: none; }
}
