:root {
  --bg: #070b14;
  --surface: rgba(15, 23, 42, 0.86);
  --surface-solid: #111827;
  --surface-soft: #182235;
  --surface-hover: #202d44;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #7c3aed;
  --primary-2: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-width: 270px;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.14), transparent 28%),
    var(--bg);
}

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

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

.loading-screen,
.auth-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}

.loader-wrap {
  display: grid;
  justify-items: center;
  gap: 15px;
  color: var(--muted);
}

.loader {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(148, 163, 184, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-card {
  width: min(470px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 38px rgba(124, 58, 237, 0.28);
  font-weight: 900;
}

.brand-mark img {
  display: none;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  background: #fff;
}

.brand-mark.has-logo img {
  display: block;
}

.brand-mark.has-logo .brand-fallback {
  display: none;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.auth-title {
  margin: 30px 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.auth-description {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 22px;
  padding: 5px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.auth-tab {
  min-height: 39px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 750;
}

.auth-tab.active {
  color: #fff;
  background: var(--surface-soft);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
}

.field label {
  color: #dbe5f3;
  font-size: 13px;
  font-weight: 750;
}

.field small {
  color: var(--muted);
  line-height: 1.5;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  transition: 160ms ease;
}

.textarea {
  min-height: 105px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(124, 58, 237, 0.85);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.13);
}

.button {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 780;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.22);
}

.button-secondary {
  color: #e6edf7;
  background: var(--surface-soft);
  border-color: var(--border);
}

.full-width {
  width: 100%;
}

.message {
  min-height: 22px;
  margin-top: 15px;
  font-size: 13px;
}

.message.error {
  color: #fca5a5;
}

.notice {
  margin-bottom: 17px;
  padding: 15px 16px;
  color: #d5dfeb;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 13px;
  line-height: 1.58;
  font-size: 13px;
}

.notice.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.notice-copy {
  margin-top: 6px;
}

.portal {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 16px;
  background: rgba(8, 13, 24, 0.92);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(22px);
}

.sidebar-header {
  padding: 4px 7px 24px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  font-weight: 750;
}

.nav-button:hover {
  color: #e5edf8;
  background: rgba(148, 163, 184, 0.06);
}

.nav-button.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.24),
    rgba(37, 99, 235, 0.18)
  );
  border-color: rgba(124, 58, 237, 0.27);
}

.nav-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 7px 4px;
}

.player-mini-card {
  padding: 13px;
  background: rgba(148, 163, 184, 0.055);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.player-mini-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.player-mini-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 20px;
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
}

.topbar-title {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  gap: 9px;
}

.content {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 27px 22px 42px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fade 180ms ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.045em;
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 17px;
}

.panel,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 15px 44px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 21px;
  border-radius: var(--radius);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.panel-spacing {
  margin-top: 17px;
}

.panel-spacing-small {
  margin-top: 14px;
}

.stat-card {
  min-height: 137px;
  padding: 20px;
  border-radius: var(--radius);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.stat-value {
  margin-top: 15px;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.compact-value {
  font-size: 20px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: capitalize;
}

.status-pending {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
}

.status-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.status-danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
}

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

.detail-card {
  padding: 14px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.detail-card strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 19px;
}

.form-grid .field {
  margin: 0;
}

.span-2 {
  grid-column: 1 / -1;
}

.file-input {
  width: 100%;
  padding: 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}

.file-input::file-selector-button {
  margin-right: 10px;
  padding: 8px 11px;
  color: #fff;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.receipt-preview {
  display: grid;
  place-items: center;
  min-height: 190px;
  overflow: hidden;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.05);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}

.receipt-preview img {
  display: none;
  max-width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.receipt-preview.has-image img {
  display: block;
}

.receipt-preview.has-image span {
  display: none;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.045);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-row {
  padding: 42px 16px;
  color: var(--muted);
  text-align: center;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 17px;
}

.conversation-list {
  display: grid;
  gap: 9px;
}

.conversation-item {
  width: 100%;
  padding: 13px;
  color: #e5edf8;
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
}

.conversation-item.active {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.12);
}

.empty-card {
  padding: 30px 14px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.message-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.chat-message {
  width: fit-content;
  max-width: min(85%, 620px);
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 13px;
  line-height: 1.5;
  font-size: 13px;
}

.chat-message.player {
  margin-left: auto;
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.25);
}

.chat-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-backdrop {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  background: #172033;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.36);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.36);
}

@media (max-width: 860px) {
  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    width: min(var(--sidebar-width), calc(100vw - 54px));
    transition: 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: 180ms ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .stats-grid,
  .form-grid,
  .details-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .content {
    padding-inline: 15px;
  }

  .topbar {
    padding-inline: 14px;
  }
}

@media (max-width: 520px) {
  .auth-card {
    padding: 26px 22px;
  }

  .topbar-actions .button {
    padding-inline: 10px;
  }

  .topbar-title span {
    display: none;
  }
}


.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-form-grid {
  margin-top: 0;
  margin-bottom: 18px;
}

.manual-method-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 18px;
  align-items: stretch;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 240px;
  overflow: hidden;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.05);
  border: 1px dashed var(--border-strong);
  border-radius: 15px;
  text-align: center;
}

.qr-preview img {
  display: none;
  width: 100%;
  height: 100%;
  max-height: 320px;
  padding: 12px;
  object-fit: contain;
  background: #fff;
}

.qr-preview.has-image img {
  display: block;
}

.qr-preview.has-image span {
  display: none;
}

.security-summary {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: center;
}

.security-score-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.security-score-block h2 {
  margin: 0 0 7px;
}

.security-ring {
  --score: 0%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface-solid) 55%, transparent 57%),
    conic-gradient(var(--success) var(--score), rgba(148, 163, 184, 0.16) 0);
  box-shadow: inset 0 0 0 1px var(--border);
}

.security-ring span {
  font-size: 25px;
  font-weight: 900;
}

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

.security-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 67px;
  padding: 12px;
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--border);
  border-radius: 12px;
  opacity: 0.58;
}

.security-item.complete {
  opacity: 1;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.06);
}

.security-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.09);
  border-radius: 50%;
  font-weight: 900;
}

.security-item.complete .security-check {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
}

.security-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.saved-methods {
  display: grid;
  gap: 10px;
}

.saved-method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px;
  background: rgba(148, 163, 184, 0.045);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.saved-method-main {
  min-width: 0;
}

.saved-method-title {
  font-weight: 820;
}

.saved-method-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(9px);
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  background: #0f172a;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0 0 6px;
}

@media (max-width: 1050px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-summary,
  .manual-method-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .stats-grid,
  .security-checklist {
    grid-template-columns: 1fr;
  }

  .security-score-block {
    align-items: flex-start;
  }

  .saved-method {
    grid-template-columns: 1fr;
  }
}

.security-overview-card {
  position: relative;
}

.text-link-button {
  margin-top: 10px;
  padding: 0;
  color: #c4b5fd;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.text-link-button:hover {
  color: #ddd6fe;
  text-decoration: underline;
}

@media (min-width: 1250px) {
  .stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-header { position: relative; }

.sidebar-collapse-button {
  position: absolute;
  top: 5px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}

.sidebar-collapse-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.portal.sidebar-collapsed {
  grid-template-columns: 78px minmax(0, 1fr);
}

.portal.sidebar-collapsed .sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

.portal.sidebar-collapsed .brand-copy,
.portal.sidebar-collapsed .nav-label,
.portal.sidebar-collapsed .sidebar-footer {
  display: none;
}

.portal.sidebar-collapsed .sidebar-header {
  padding-left: 0;
  padding-right: 0;
}

.portal.sidebar-collapsed .brand-row {
  justify-content: center;
}

.portal.sidebar-collapsed .sidebar-collapse-button {
  top: 58px;
  right: 23px;
}

.portal.sidebar-collapsed .sidebar-collapse-button svg {
  transform: rotate(180deg);
}

.portal.sidebar-collapsed .nav-button {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

.portal.sidebar-collapsed .nav-icon {
  width: 34px;
  height: 34px;
}

.game-view {
  height: calc(100vh - 73px);
  padding: 0;
  overflow: hidden;
}

.game-frame {
  display: block;
  width: 100%;
  height: 100%;
  background: #061d58;
  border: 0;
}

.commission-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 170px;
}

.commission-control .input {
  width: 86px;
  min-height: 38px;
}

.small-copy {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .sidebar-collapse-button { display: none; }
  .game-view { height: calc(100vh - 64px); }
}


.notification-wrap { position: relative; }
.notification-button {
  position: relative; display:grid; place-items:center; width:42px; height:42px;
  color:var(--text); background:var(--surface); border:1px solid var(--border);
  border-radius:12px; cursor:pointer;
}
.notification-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.notification-badge { position:absolute; top:-6px; right:-6px; min-width:19px; height:19px; padding:0 5px; display:grid; place-items:center; border-radius:999px; background:#ef4444; color:#fff; font-size:10px; font-weight:900; border:2px solid var(--background); }
.notification-panel { position:absolute; z-index:90; top:50px; right:0; width:min(390px,calc(100vw - 28px)); max-height:480px; overflow:auto; background:var(--surface); border:1px solid var(--border); border-radius:15px; box-shadow:0 24px 80px rgba(0,0,0,.38); }
.notification-panel-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; background:var(--surface); border-bottom:1px solid var(--border); }
.text-button { color:#a78bfa; background:none; border:0; cursor:pointer; font:inherit; font-size:12px; font-weight:750; }
.notification-list { display:grid; }
.notification-item { padding:13px 14px; border-bottom:1px solid var(--border); }
.notification-item.unread { background:rgba(124,58,237,.11); }
.notification-item-title { font-weight:800; }
.notification-item-copy,.notification-item-time { margin-top:4px; color:var(--muted); font-size:12px; line-height:1.45; }
.notification-empty { padding:28px 16px; color:var(--muted); text-align:center; }

.game-view { min-height:calc(100vh - 73px); height:auto; overflow:visible; }
.game-lobby { padding:30px clamp(18px,3vw,44px); }
.game-lobby-heading { margin-bottom:20px; }
.game-banner-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,390px)); gap:20px; }
.game-banner-card { overflow:hidden; padding:0; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:20px; cursor:pointer; text-align:left; box-shadow:0 18px 50px rgba(0,0,0,.19); transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.game-banner-card:hover:not(:disabled) { transform:translateY(-4px); border-color:rgba(124,58,237,.65); box-shadow:0 25px 65px rgba(0,0,0,.28); }
.game-banner-card:disabled { cursor:not-allowed; opacity:.62; }
.game-banner-media { position:relative; aspect-ratio:16/8.5; overflow:hidden; background:linear-gradient(135deg,#1d4ed8,#7c3aed 58%,#f59e0b); }
.game-banner-media img { display:none; width:100%; height:100%; object-fit:cover; }
.game-banner-media.has-image img { display:block; }
.game-banner-media.has-image .game-banner-fallback { display:none; }
.game-banner-fallback { position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-size:clamp(34px,7vw,72px); font-weight:1000; letter-spacing:.09em; text-shadow:0 7px 24px rgba(0,0,0,.3); }
.game-banner-status { position:absolute; top:13px; right:13px; padding:7px 10px; border-radius:999px; color:#fff; background:rgba(15,23,42,.8); font-size:11px; font-weight:850; text-transform:uppercase; }
.game-banner-status.enabled { background:rgba(5,150,105,.9); }
.game-banner-status.disabled { background:rgba(185,28,28,.9); }
.game-banner-copy { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:17px 18px 19px; }
.game-banner-copy h2 { margin:0; font-size:22px; }
.game-banner-copy p { margin:7px 0 0; color:var(--muted); line-height:1.5; }
.game-launch-label { flex:0 0 auto; color:#a78bfa; font-weight:850; white-space:nowrap; }
.game-runtime { position:relative; width:100%; height:100vh; overflow:hidden; background:#061d58; }
.game-runtime .game-frame { width:100%; height:100%; }
.game-exit-button { position:absolute; z-index:20; top:10px; left:10px; padding:9px 12px; color:#fff; background:rgba(2,6,23,.78); border:1px solid rgba(255,255,255,.22); border-radius:10px; cursor:pointer; font-weight:800; backdrop-filter:blur(8px); }
.portal.game-active { grid-template-columns:1fr; }
.portal.game-active .sidebar,.portal.game-active .topbar { display:none; }
.portal.game-active .main { min-width:0; }
.portal.game-active .content { padding:0; }
.portal.game-active #view-games { min-height:100vh; height:100vh; }
.modal-card-wide { width:min(980px,94vw); max-height:92vh; overflow:auto; }
#gameDepositModalBody .panel { border:0; box-shadow:none; padding:0; background:transparent; }
#gameDepositModalBody .page-heading { display:none; }

@media (max-width:860px) {
  .game-lobby { padding:20px 14px; }
  .game-banner-grid { grid-template-columns:1fr; }
  .game-runtime { height:100dvh; }
}
