@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&family=Press+Start+2P&display=swap');

:root {
  --bg: #efeff2;
  --text: #141723;
  --muted: #61708f;
  --line: #d6d9e3;
  --card: #ffffff;
  --purple: #7f3fde;
  --purple-deep: #21073a;
  --purple-soft: #a156f0;
  --lime: #f4b730;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.muted {
  color: var(--muted);
}

.container {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 18px 0 30px;
}

.topbar {
  background: #151627;
  color: #f6f8ff;
  border-bottom: 2px solid #2b2e48;
}

.topbar-inner {
  width: min(1120px, 94vw);
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.identity {
  font-size: 0.86rem;
  color: #cdd6ff;
}

.inline-form {
  margin: 0;
}

.link-btn {
  appearance: none;
  border: 1px solid #9ea7c9;
  border-radius: 9px;
  background: #fff;
  color: #2f3a59;
  text-decoration: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.link-btn.danger {
  border-color: #df8e8e;
  color: #8f1a25;
}

.topbar .link-btn {
  background: transparent;
  color: #f6f8ff;
}

.topbar .link-btn.danger {
  color: #ffd5d7;
}

.flash-stack {
  margin-bottom: 12px;
}

.flash {
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: #f9fbff;
}

.flash.success {
  background: #ebfbef;
  border-color: #96d9a7;
}

.flash.danger {
  background: #fff1f0;
  border-color: #f2aaaa;
}

.flash.warning {
  background: #fff8e7;
  border-color: #f3d388;
}

.page-head h1 {
  margin-bottom: 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(9, 18, 36, 0.08);
  padding: 14px;
  margin-bottom: 14px;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
}

button {
  border: 1px solid #2353c2;
  border-radius: 10px;
  padding: 9px 12px;
  background: #2f6ef8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.96);
}

.btn-primary {
  border: 0;
  background: linear-gradient(90deg, #7c45da 0%, #8740d7 100%);
}

.page-login .container,
.page-dashboard .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.page-login {
  background: #ebebee;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 20px 12px;
}

.login-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.login-card {
  width: min(90vw, 410px);
  border: 1px solid #d8dae5;
  border-radius: 18px;
  background: #f9f9fb;
  box-shadow: 0 6px 16px rgba(24, 20, 41, 0.1);
  padding: 24px 16px 16px;
  display: grid;
  gap: 10px;
}

.login-card h1 {
  text-align: center;
  font-size: 2rem;
  margin: 0;
  font-weight: 800;
}

.login-card p {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.02rem;
  color: #617091;
}

.login-card input {
  height: 48px;
  border-radius: 12px;
  border: 1px solid #d8d8df;
  font-size: 1.02rem;
  padding: 0 14px;
  background: #f1f1f4;
  color: #505f7f;
}

.btn-login {
  margin-top: 4px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #7c45da 0%, #8740d7 100%);
  color: #fff;
  font-size: 1.1rem;
}

.page-dashboard {
  background: radial-gradient(circle at top left, #2d0d4d 0%, #19072f 56%, #130524 100%);
}

.dash-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.dash-panel {
  width: min(640px, 96vw);
  background: #f4f4f6;
  border: 1px solid rgba(160, 165, 190, 0.38);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(5, 2, 18, 0.34);
  padding: 16px 14px 14px;
}

.switch-panel {
  width: min(860px, 96vw);
}

.coins-panel {
  width: min(560px, 96vw);
}

.app-shell-panel {
  width: min(860px, 96vw);
}

.app-views {
  position: relative;
  min-height: 420px;
}

.app-view {
  display: none;
  opacity: 0;
}

.app-view.is-active {
  display: block;
  opacity: 1;
}

.app-view.slide-right.is-active {
  animation: appSlideRight 0.24s ease both;
}

.app-view.slide-left.is-active {
  animation: appSlideLeft 0.24s ease both;
}

@keyframes appSlideRight {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes appSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.view-head h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
}

.view-close {
  border: 0;
  background: transparent;
  color: #4d5779;
  box-shadow: none;
  padding: 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  min-width: 24px;
}

.view-close:hover {
  filter: none;
  color: #1e253e;
}

.view-close:focus-visible {
  outline: 2px solid #8b5ae9;
  outline-offset: 2px;
  border-radius: 6px;
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dash-head h1 {
  flex: 1;
  text-align: left;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  margin: 0;
}

.profile-icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #c7cbe2;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(43, 23, 74, 0.2);
}

.profile-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
}

.profile-icon-btn:focus-visible {
  outline: 2px solid #8a56e9;
  outline-offset: 2px;
}

.admin-link {
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid #c1c4d6;
  border-radius: 10px;
  padding: 5px 8px;
  background: #fff;
}

.control-strip {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.control-strip label {
  font-weight: 600;
  color: #37405f;
}

.control-strip select,
.single-arcade-label {
  min-height: 42px;
  border-width: 1px;
  border-color: #cdcfe0;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 600;
  color: #3c4767;
}

.profile-card {
  max-width: 560px;
  margin: 0 auto;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid #c8cfe9;
  object-fit: cover;
}

.profile-name {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2540;
}

.profile-sub {
  margin: 0;
  font-size: 0.86rem;
  color: #60709a;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.profile-item {
  border: 1px solid #d9deef;
  border-radius: 10px;
  background: #f9fbff;
  padding: 8px 10px;
}

.profile-item span {
  display: block;
  font-size: 0.75rem;
  color: #667194;
  margin-bottom: 3px;
}

.profile-item strong {
  font-size: 0.9rem;
  color: #2a3352;
  word-break: break-word;
}

.profile-item-wide {
  grid-column: 1 / -1;
}

.profile-arcade-block {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.profile-section-title {
  margin: 0;
  font-weight: 700;
  color: #36436a;
}

.profile-label {
  font-size: 0.82rem;
  color: #596688;
  font-weight: 600;
}

.profile-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-logout-form {
  margin: 0 0 10px;
}

.now-playing-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid #d1d5e3;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #435070;
  font-size: 0.83rem;
}

.now-capsule {
  position: relative;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  height: clamp(190px, 34vw, 300px);
  border: 1px solid #b3a8d6;
  background: linear-gradient(135deg, #3d1f66 0%, #1f1436 100%);
}

.now-capsule-media {
  position: absolute;
  inset: 0;
}

.now-capsule-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.1) brightness(0.72);
}

.now-capsule-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(24, 10, 42, 0.18) 0%, rgba(24, 10, 42, 0.56) 100%);
}

.now-capsule-title {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 0;
  color: #fff;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(186, 132, 255, 0.95),
    0 0 26px rgba(160, 96, 255, 0.85),
    0 0 38px rgba(120, 64, 235, 0.65);
}

.now-marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: nowTicker 14s linear infinite;
  will-change: transform;
}

.now-marquee-text {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0 12px;
  color: #fff !important;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(186, 132, 255, 0.95),
    0 0 26px rgba(160, 96, 255, 0.85),
    0 0 38px rgba(120, 64, 235, 0.65);
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.8rem, 2.3vw, 1.12rem) !important;
  line-height: 1.12;
  letter-spacing: 0.02em;
}

@keyframes nowTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.now-capsule.no-media .now-capsule-overlay {
  background: linear-gradient(90deg, rgba(58, 29, 97, 0.72), rgba(29, 16, 49, 0.72));
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.coins-grid {
  margin-top: 6px;
}

.cash-credit-wrap {
  display: grid;
  place-items: center;
  margin-top: 6px;
  margin-bottom: 10px;
}

.credit-coin-tile {
  width: min(240px, 100%);
}

.pix-tile {
  border: 2px solid var(--purple-soft);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: #7e32c3;
  box-shadow: 0 5px 12px rgba(48, 20, 80, 0.3);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-rows: 1fr auto;
}

.tile-link {
  text-decoration: none;
  display: grid;
  grid-template-rows: 1fr auto;
}

.pix-tile:disabled {
  opacity: 0.65;
}

.tile-art-wrap {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #802ac2 0%, #7525bd 100%);
  min-height: 0;
  height: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.tile-art {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: fill;
  image-rendering: auto;
}

.tile-label {
  display: block;
  background: #fff;
  color: #131313;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.45rem, 1vw, 0.7rem);
  line-height: 1.4;
  padding: 8px 6px;
}

.page-upi .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.upi-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
  background: radial-gradient(circle at 15% 20%, #4f2692 0%, #21073a 50%, #140524 100%);
}

.upi-media-card {
  position: relative;
  width: min(520px, 94vw);
  height: min(86vh, 860px);
  border-radius: 16px;
  border: 2px solid rgba(230, 232, 255, 0.45);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(8, 2, 16, 0.4);
  background: #12091f;
}

.upi-media-slot {
  width: 100%;
  height: 100%;
}

.upi-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upi-card-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #332b50 0%, #1a132b 100%);
  color: #e8e9f8;
  font-weight: 600;
}

.upi-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(10, 8, 16, 0.7);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 700;
}

.upi-arcade-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(10, 8, 16, 0.68);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(3px);
  font-weight: 600;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 10px;
  width: min(100%, 560px);
}

.poster-card {
  border: 1px solid #a981da;
  border-radius: 14px;
  background: #1a1730;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.poster-wrap {
  aspect-ratio: 2 / 3;
  background: #1a1730;
  display: grid;
  place-items: center;
  position: relative;
}

.poster-wrap img.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.gameplay-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  background: #000;
}

.poster-fallback {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #d2d7ee;
}

.poster-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(40, 14, 76, 0.38);
}

.poster-card.selected {
  border-color: #ffc45e;
  box-shadow: 0 0 0 2px rgba(255, 196, 94, 0.55), 0 0 20px rgba(166, 96, 255, 0.9);
  animation: neonPulse 0.8s infinite alternate;
}

.poster-card.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 225, 154, 0.9);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(255, 208, 118, 0.35);
}

.poster-card.selected .gameplay-media {
  opacity: 1;
}

@keyframes neonPulse {
  from {
    box-shadow: 0 0 0 2px rgba(149, 83, 239, 0.35), 0 0 12px rgba(149, 83, 239, 0.5);
  }
  to {
    box-shadow: 0 0 0 2px rgba(161, 95, 255, 0.8), 0 0 24px rgba(161, 95, 255, 0.95);
  }
}

.detail-stage {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  filter: blur(22px) saturate(1.25);
}

.detail-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: blur(22px) saturate(1.25);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 40, 0.6);
}

.detail-shell {
  position: relative;
  width: min(920px, 96vw);
  z-index: 2;
}

.detail-close {
  position: absolute;
  top: -12px;
  right: -4px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: rgba(18, 7, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 14px;
  background: rgba(247, 247, 251, 0.96);
  max-width: 860px;
  margin: 0 auto;
}

.game-detail-stage {
  position: relative;
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(181, 156, 222, 0.6);
  background: #1a1030;
}

.game-detail-bg {
  position: absolute;
  inset: 0;
}

.game-detail-bg-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: blur(18px) saturate(1.18);
}

.game-detail-bg-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #ebe7f8;
  background: linear-gradient(145deg, #4f2a87, #23103f);
  font-weight: 600;
}

.game-detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 8, 35, 0.58);
}

.game-detail-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 14px;
  background: rgba(247, 247, 251, 0.96);
  max-width: 860px;
  margin: 18px auto;
}

.game-detail-stage .detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.app-view .upi-media-card {
  margin: 0 auto;
}

.detail-media {
  border-radius: 10px;
  overflow: hidden;
  background: #1d1732;
  min-height: 320px;
}

.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  margin-bottom: 4px;
}

.detail-code {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: #676f90;
}

.detail-desc {
  margin-top: 10px;
  color: #28314d;
  line-height: 1.5;
}

.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-thumb {
  width: min(260px, 100%);
  border-radius: 10px;
  border: 1px solid #d4d8e6;
  display: block;
}

.drawer {
  border: 1px solid #d8d8e6;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
}

.drawer.is-hidden {
  display: none;
}

.news-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.news-list li {
  color: #3f4662;
  font-size: 0.88rem;
}

.status-line {
  margin: 0 0 10px;
  padding: 8px 9px;
  border-radius: 9px;
  font-weight: 600;
  color: #4f5570;
  background: #edf0f8;
  font-size: 0.88rem;
}

.status-line.success {
  color: #0a6a45;
  background: #e9f8ef;
}

.status-line.error {
  color: #9f1b24;
  background: #fff0f2;
}

.activity-box {
  border: 1px solid #dddff0;
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
  margin-bottom: 12px;
}

.activity-box summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.activity-box ul {
  margin: 8px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

.activity-box li {
  color: #4b5879;
  font-size: 0.8rem;
}

.dash-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.install-btn {
  border: 1px dashed #8c90ac;
  background: #fff;
  color: #454f70;
  border-radius: 999px;
  padding: 8px 15px;
}

.profile-install-btn {
  width: 100%;
  margin: 0 0 10px;
  border-style: solid;
  border-color: #8a6bd8;
  color: #fff;
  background: linear-gradient(90deg, #7c45da 0%, #8740d7 100%);
}

.logout-pixel {
  border: 2px solid #1d1206;
  background: linear-gradient(180deg, #ffc84e 0%, #f1a52d 100%);
  color: #23180b;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.45rem, 1.7vw, 0.68rem);
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: 0 4px 0 #936620;
}

.logout-pixel:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #936620;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
}

.grid-form .full {
  grid-column: 1 / -1;
}

.admin-head {
  display: grid;
  gap: 10px;
}

.admin-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab {
  text-decoration: none;
  border: 1px solid #c8cce0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #3a4463;
  font-weight: 600;
  font-size: 0.86rem;
}

.admin-tab.is-active {
  background: linear-gradient(90deg, #7c45da 0%, #8740d7 100%);
  color: #fff;
  border-color: #7f4ad7;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-kpi {
  margin-bottom: 0;
}

.admin-kpi h3 {
  margin-bottom: 8px;
}

.admin-kpi-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  color: #1c1f31;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-card-head h3 {
  margin: 0;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-toolbar input[type='search'] {
  flex: 1 1 260px;
  min-width: 220px;
}

.admin-toolbar .link-btn {
  padding: 9px 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.is-hidden {
  display: none !important;
}

.admin-item {
  margin: 0;
}

.scrape-state {
  display: inline-block;
  min-width: 62px;
  text-align: center;
  border: 1px solid #d1d6ea;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8f9ff;
  color: #3b4667;
  font-size: 0.78rem;
}

.admin-subsearch {
  margin-bottom: 2px;
}

.assignment-card {
  padding: 12px;
  margin: 0;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  border-bottom: 1px solid #e2e5f0;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.admin-table th {
  color: #4a5477;
  font-weight: 700;
  background: #f6f7fc;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.user-card summary {
  cursor: pointer;
  padding: 10px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  font-weight: 600;
}

.user-body {
  border-top: 1px solid var(--line);
  padding: 11px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
}

.checkbox-wrap input {
  width: auto;
  margin-right: 8px;
}

hr {
  border: 0;
  border-top: 1px solid #e0e3ef;
  margin: 14px 0;
}

@media (min-width: 901px) {
  .app-shell-panel,
  .coins-panel,
  .switch-panel {
    width: min(540px, 94vw);
  }

  .app-views {
    min-height: 0;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 240px);
    justify-content: center;
  }

  .switch-grid {
    width: min(100%, 500px);
  }
}

@media (max-width: 900px) {
  .login-logo {
    width: 90px;
    height: 90px;
  }

  .login-card {
    width: min(94vw, 380px);
    padding: 20px 14px 14px;
  }

  .login-card h1 {
    font-size: 1.6rem;
  }

  .login-card p {
    font-size: 0.95rem;
  }

  .grid-form,
  .admin-kpi-grid,
  .user-card summary,
  .top-actions {
    grid-template-columns: 1fr;
  }

  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tile-label {
    font-size: clamp(0.4rem, 1.9vw, 0.62rem);
  }

  .now-marquee-text {
    font-size: clamp(1rem, 4.8vw, 1.45rem) !important;
    line-height: 1.08;
  }

  .now-capsule {
    height: clamp(185px, 46vw, 280px);
  }

  .admin-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-toolbar input[type='search'] {
    min-width: 0;
  }

  .dash-panel,
  .switch-panel,
  .coins-panel,
  .app-shell-panel {
    width: min(520px, 96vw);
    border-radius: 16px;
    padding: 12px 10px 12px;
  }

  .dash-head {
    flex-wrap: wrap;
  }

  .dash-head h1 {
    text-align: left;
    font-size: 1.15rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .detail-main,
  .game-detail-main {
    grid-template-columns: 1fr;
  }

  .detail-media {
    min-height: 220px;
  }

  .game-detail-stage {
    min-height: 0;
  }

  .topbar-inner {
    min-height: auto;
    padding: 8px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .now-marquee-text {
    font-size: clamp(1.08rem, 5.8vw, 1.62rem) !important;
    line-height: 1.02;
  }

  .now-capsule {
    height: clamp(205px, 58vw, 320px);
  }
}
