/* REKT ARCADE - reusable components */
.tag { display: inline-block; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--accent); color: var(--accent); border-radius: 3px; }
.diff { display: inline-flex; gap: 3px; } .diff i { width: 10px; height: 10px; background: var(--line2); transform: skewX(-12deg); } .diff i.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dur { font-family: var(--f-mono); font-size: .75rem; color: var(--dim); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 8px 0; }

/* arcade cabinet card */
.cabinets { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cabinets { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 960px) { .cabinets { grid-template-columns: repeat(3, 1fr); } }
.cabinet { --accent: var(--lime); position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, #1a1745, #0e0c2b 60%); border: 2px solid var(--line2); border-radius: 14px 14px 6px 6px; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; box-shadow: 0 10px 0 -4px #05041a, 0 18px 30px rgba(0,0,0,.4); }
.cabinet:hover, .cabinet:focus-within { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 0 -4px #05041a, 0 0 34px color-mix(in srgb, var(--accent) 40%, transparent), 0 18px 30px rgba(0,0,0,.4); }
.cabinet-top { padding: 10px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 28%, #100e2e), #100e2e); border-bottom: 2px solid var(--accent); }
.marquee { font-family: var(--f-display); font-size: 1.05rem; letter-spacing: .08em; color: var(--accent); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent); }
.cabinet-screen { position: relative; margin: 12px 12px 0; border: 4px solid #05041a; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--line2), 0 0 0 2px #251f58; overflow: hidden; aspect-ratio: 16 / 10; background: #05041a; }
.cabinet-screen .cover, .cabinet-screen .cover svg { width: 100%; height: 100%; display: block; }
.scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 3px), radial-gradient(120% 100% at 50% 0, rgba(255,255,255,.08), transparent 55%); }
.cabinet-body { padding: 12px 14px 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.cabinet .concept { margin: 0; color: #dcd9ff; font-size: .92rem; min-height: 2.8em; }
.cabinet .best { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-mono); font-size: .75rem; color: var(--dim); border-top: 1px dashed var(--line2); padding-top: 8px; }
.cabinet .best strong { color: var(--gold); font-size: 1.1rem; }
.cabinet .btn.play { width: 100%; --c: var(--accent); }

/* pills, tabs, inputs */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pill { min-height: 40px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line2); color: var(--dim); border-radius: 999px; cursor: pointer; font-family: var(--f-body); font-size: .85rem; font-weight: 600; touch-action: manipulation; }
.pill.sel, .pill:hover { color: #0a0820; background: var(--lime); border-color: var(--lime); }
.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; gap: 4px; margin: 10px 0; }
.tab { min-height: 42px; padding: 0 18px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-family: var(--f-display); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; border-radius: 7px; }
.tab.sel { background: var(--lime); color: #0a0820; }
.input { width: 100%; min-height: 48px; padding: 0 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; font: inherit; font-size: 16px; }
.input:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px rgba(183,255,42,.2); }
.toolbar { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 18px 0 4px; } @media (min-width: 640px) { .toolbar { grid-template-columns: 1fr 220px; } }
.lbl { display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 14px 0 6px; }

/* chips / badges */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { font-family: var(--f-mono); font-size: .75rem; padding: 4px 10px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 999px; color: #dcd9ff; }
.chip.good { border-color: var(--good); color: var(--good); } .chip.bad { border-color: var(--bad); color: #ff7d92; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0; }
.badge { font-family: var(--f-display); font-size: .75rem; letter-spacing: .05em; padding: 6px 12px; background: var(--panel2); border: 1px solid var(--line2); text-transform: uppercase; }
.badge.gold { background: linear-gradient(90deg, #ffc933, #ff9a2b); color: #1a1100; border-color: transparent; }

/* meters */
.meters { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 14px 0; } @media (min-width: 640px) { .meters { grid-template-columns: repeat(2, 1fr); } }
.meter .m-top { display: flex; justify-content: space-between; font-size: .8rem; margin-bottom: 4px; } .meter .m-top b { font-family: var(--f-mono); }
.meter.low .m-top b { color: var(--red); }
.m-bar { height: 10px; background: #05041a; border: 1px solid var(--line2); border-radius: 2px; overflow: hidden; } .m-bar i { display: block; height: 100%; transition: width .5s ease; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; } @media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; border-radius: 8px; } .stats dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); } .stats dd { margin: 4px 0 0; font-family: var(--f-display); font-size: 1.15rem; word-break: break-word; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th { text-align: left; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
.recap-table tr.ok td:first-child { box-shadow: inset 3px 0 0 var(--good); } .recap-table tr.miss td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.board tr.gold td { background: linear-gradient(90deg, rgba(255,201,51,.16), transparent); } .board tr.silver td { background: linear-gradient(90deg, rgba(200,210,255,.12), transparent); } .board tr.bronze td { background: linear-gradient(90deg, rgba(255,140,60,.12), transparent); }
.who { display: inline-flex; align-items: center; gap: 8px; } .who.big { gap: 14px; } .who.big small { display: block; color: var(--dim); }
.rank { font-family: var(--f-display); }

/* empty / notices */
.empty { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 28px 18px; border: 1px dashed var(--line2); border-radius: 12px; background: rgba(16,14,46,.5); }
.empty .empty-ico { width: 40px; height: 40px; color: var(--purple); } .empty h3 { margin: 6px 0 0; } .empty p { color: var(--dim); max-width: 52ch; margin: 0 0 8px; }
.notice { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--dim); background: rgba(43,228,255,.06); border: 1px solid rgba(43,228,255,.25); padding: 10px 12px; border-radius: 8px; margin: 12px 0; } .notice .svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--cyan); }
.skeleton { padding: 18px; color: var(--dim); font-family: var(--f-mono); font-size: .8rem; animation: pulse 1.4s infinite; } @keyframes pulse { 50% { opacity: .5; } }

/* timer */
.timer { display: flex; align-items: center; gap: 10px; margin: 8px 0; } .timer .bar { flex: 1; height: 12px; background: #05041a; border: 1px solid var(--line2); transform: skewX(-12deg); overflow: hidden; } .timer .bar i { display: block; height: 100%; background: var(--cyan); width: 100%; } .timer .tlabel { font-family: var(--f-mono); font-size: .8rem; min-width: 3.6em; text-align: right; }
.timer.urgent .bar i { background: var(--red); animation: urgent .5s infinite alternate; } .timer.urgent .tlabel { color: var(--red); } @keyframes urgent { to { filter: brightness(1.6); } }
.timer.run .bar i { background: var(--lime); }
.counter { font-family: var(--f-display); font-variant-numeric: tabular-nums; }

/* toast + modal */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 120; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1100px) { #toasts { bottom: 24px; } }
.toast { display: grid; gap: 2px; padding: 12px 14px; background: #15133a; border: 1px solid var(--lime); border-left-width: 5px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toastIn .25s ease both; } .toast span { color: var(--dim); font-size: .85rem; } .toast.gold { border-color: var(--gold); } .toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.modal-back { position: fixed; inset: 0; z-index: 110; background: rgba(3,2,14,.78); display: grid; place-items: end center; padding: 0; backdrop-filter: blur(4px); animation: fade .2s both; } @keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px 18px 0 0; padding: 0 18px calc(18px + var(--safe-b)); outline: none; animation: sheet .25s ease both; } @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { .modal-back { place-items: center; padding: 20px; } .modal { border-radius: 16px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--panel); padding: 14px 0 6px; z-index: 1; } .modal-head h2 { margin: 0; font-size: 1.2rem; }
.settings .set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); } .settings .set-row small { display: block; color: var(--dim); max-width: 32ch; } .settings select { width: 170px; }
.toggle { position: relative; width: 56px; height: 32px; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; flex: none; } .toggle i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; } .toggle.on { background: var(--lime); } .toggle.on i { transform: translateX(24px); }

/* achievements */
.ach-grid { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 640px) { .ach-grid { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 960px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }
.ach { --t: var(--cyan); display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; } .ach.rare { --t: var(--purple); } .ach.epic { --t: var(--gold); }
.ach-ico { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: #0a0820; border: 2px solid var(--t); color: var(--t); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.ach h3 { margin: 0 0 2px; font-size: .95rem; } .ach p { margin: 0 0 4px; font-size: .82rem; color: #cfcbff; } .ach small { font-family: var(--f-mono); color: var(--dim); font-size: .68rem; text-transform: uppercase; }
.ach.on { box-shadow: 0 0 0 1px color-mix(in srgb, var(--t) 50%, transparent), 0 0 24px color-mix(in srgb, var(--t) 18%, transparent); } .ach.off { opacity: .55; } .ach.off .ach-ico { filter: grayscale(1); }
.ach-sum { display: grid; gap: 8px; margin: 14px 0 22px; } .ach-sum b { font-family: var(--f-display); font-size: 1.6rem; }
.unlocks { margin: 20px 0; display: grid; gap: 10px; }

/* confetti */
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; z-index: 30; pointer-events: none; } .burst i { position: absolute; width: 8px; height: 8px; animation: pop 1s ease-out forwards; } @keyframes pop { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), calc(var(--dy) + 60px)) rotate(240deg) scale(.4); opacity: 0; } }

/* faq */
.faq { display: grid; gap: 10px; margin-top: 20px; } .faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; } .faq-item.open { border-color: var(--lime); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; min-height: 56px; padding: 12px 16px; background: transparent; color: var(--text); border: 0; cursor: pointer; font: 700 1rem var(--f-body); } .faq-q i { font-style: normal; color: var(--lime); font-size: 1.4rem; transition: transform .2s; } .faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { padding: 0 16px 6px; color: #d4d1ff; }

/* horizontally scrollable pill row (mobile-friendly filters) */
@media (max-width: 720px) {
  .pills.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 4px 16px 8px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pills.scroll::-webkit-scrollbar { display: none; }
  .pills.scroll .pill { flex: none; scroll-snap-align: start; white-space: nowrap; min-height: 44px; }
  .tabs { display: flex; } .tabs .tab { flex: 1; padding: 0 8px; }
}
.podium.ghost { height: 120px; margin: 0 0 14px; opacity: .85; }

/* Phones: tables keep every column on screen instead of hiding the last ones behind a sideways scroll. */
@media (max-width: 480px) {
  th { padding: 8px 5px; font-size: .58rem; letter-spacing: .03em; }
  td { padding: 8px 5px; }
  th:first-child, td:first-child { padding-left: 10px; } th:last-child, td:last-child { padding-right: 10px; }
  table { font-size: .8rem; }
  .diff-matrix td:not(:first-child) { white-space: nowrap; font-size: .74rem; }
  .diff-matrix td:first-child { font-size: .78rem; line-height: 1.25; }
}
@media (max-width: 360px) { .diff-matrix td:not(:first-child) { white-space: normal; } }

@media (max-width: 480px) {
  .table-wrap.stack { overflow-x: visible; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack table, .table-wrap.stack tbody { display: block; }
  .table-wrap.stack tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap.stack tr:last-child { border-bottom: 0; }
  .table-wrap.stack td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; box-shadow: none !important; }
  .table-wrap.stack td.wide { grid-column: 1 / -1; }
  .table-wrap.stack td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
  .table-wrap.stack td[data-label=""]::before { display: none; }
  .table-wrap.stack .recap-table tr.ok { box-shadow: inset 3px 0 0 var(--good); } .table-wrap.stack .recap-table tr.miss { box-shadow: inset 3px 0 0 var(--bad); }
}
