:root {
  --font-main: 'Cairo','Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji','Segoe UI Symbol',system-ui,-apple-system,sans-serif;
  --bg: #05070f;
  --bg-2: #0a0d18;
  --panel: #0b1020;
  --panel-2: #11182c;
  --text: #ebedff;
  --muted: #97a2c4;
  --primary: #3f86ff;
  --primary-soft: #5c9aff;
  --border: rgba(255, 255, 255, 0.07);
  --accent: #1fc9ab;
  --warn: #f6b348;
  --danger: #ef476f;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(2, 3, 12, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main, 'Cairo','Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji','Segoe UI Symbol',system-ui,-apple-system,sans-serif);
  background:
    radial-gradient(circle at 20% 14%, rgba(63,134,255,0.05), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(31,201,171,0.04), transparent 28%),
    linear-gradient(160deg, #04060e, #0a0d18 55%, #0c101f);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, 94vw);
  margin: 0 auto 80px;
  padding-top: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: linear-gradient(120deg, #0b0f1d, #121a2f);
  color: #fff;
  box-shadow: 0 12px 28px rgba(3, 4, 18, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3f86ff, #5c9aff);
  box-shadow: 0 10px 24px rgba(63,134,255,0.32);
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.brand-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
}

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

.notice {
  background: linear-gradient(135deg, rgba(31,201,171,0.12), rgba(5,7,15,0.92));
  border: 1px solid rgba(31, 201, 171, 0.32);
  color: #d6fff1;
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-weight: 600;
}

.search-wrap {
  margin: 18px 0 10px;
  display: flex;
  justify-content: center;
}

.search {
  width: min(520px, 100%);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.16);
  font-size: 14px;
}

.panel {
  background: linear-gradient(170deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.5px;
}

h1, h2, h3 {
  margin: 4px 0;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(106,108,255,0.12), rgba(21, 25, 60, 0.85));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero .stat-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 180px));
  justify-content: start;
  gap: 12px;
}

.game-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(3, 7, 18, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border 0.12s ease;
  display: grid;
  grid-template-rows: 1fr auto;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 200px;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card .title {
  padding: 10px 12px;
  font-weight: 700;
  text-align: center;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card.active {
  border: 2px solid var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(106,108,255,0.3);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  box-shadow: 0 10px 26px rgba(3,7,18,0.32);
  display: grid;
  grid-template-rows: 170px auto;
}

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

.card-body {
  padding: 12px;
  display: grid;
  gap: 6px;
}

/* Admin request cards (deposits/topups) */
.request-card {
  grid-template-rows: auto;
}
.request-card .proof-preview {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.22);
  max-height: 240px;
}
.request-card .proof-preview img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.price-tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(106,108,255,0.15);
  color: #e0e2ff;
  font-weight: 700;
}

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

.tiny {
  font-size: 12px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: transform 0.1s ease, box-shadow 0.16s ease, background 0.1s ease, border 0.1s ease;
  box-shadow: 0 7px 18px rgba(47, 109, 224, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(47, 109, 224, 0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(47, 109, 224, 0.16);
}

.btn:focus {
  outline: 3px solid rgba(106,108,255,0.28);
  outline-offset: 1px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.btn.outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  border-color: var(--primary);
}

.btn.danger {
  background: linear-gradient(135deg, var(--danger), #f68fa4);
  border-color: #d22650;
  box-shadow: 0 7px 18px rgba(239, 71, 111, 0.18);
}

.btn.small {
  padding: 8px 10px;
  font-size: 13px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dfe2ff;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}

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

.chip-warn {
  color: #f6d87a;
  background: rgba(246, 179, 72, 0.12);
  border-color: rgba(246, 179, 72, 0.25);
}

.chip-success {
  color: #8ff0d0;
  background: rgba(31, 231, 181, 0.12);
  border-color: rgba(31, 231, 181, 0.25);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}

.badge.approved {
  background: #d1f7f0;
  color: #0f5132;
}

.badge.pending {
  background: #fff3cd;
  color: #9d6400;
}

.badge.rejected {
  background: #fde2e7;
  color: #842029;
}

.badge.sold {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.badge.completed {
  background: #d1f7f0;
  color: #0f5132;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

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

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

textarea {
  resize: vertical;
}

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

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #11152c;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dual-auth {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.auth-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 8px 18px rgba(3, 7, 18, 0.35);
  display: grid;
  gap: 10px;
}

.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.cta-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 10px 20px rgba(3, 7, 18, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.wallet-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 8px 18px rgba(3, 7, 18, 0.3);
  display: grid;
  gap: 8px;
}

.wallet-card .cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.method-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(3, 7, 18, 0.3);
  display: grid;
  gap: 6px;
}

.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, #060814, #0e1323);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.loader.hidden {
  display: none;
}

.loader .spinner {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.08);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .session {
    width: 100%;
  }
}
