/* ==========================================================================
   SkillMatch / GameCard Toss Design System
   Color Palette:
   Background:     #070912
   Primary:        #7568FF
   Secondary:      #9B91FF
   Card:           #111728
   Card Secondary: #171E30
   Border:         #29334A
   Success:        #35D48C
   Danger:         #FF5F78
   Warning:        #FFB84D
   Text:           #F5F7FF
   Muted:          #8F9AB0
   ========================================================================== */

:root {
  --bg: #070912;
  --bg-card: #111728;
  --bg-card-sec: #171E30;
  --primary: #7568FF;
  --primary-hover: #887CFF;
  --secondary: #9B91FF;
  --border: #29334A;
  --border-focus: #7568FF;
  --success: #35D48C;
  --danger: #FF5F78;
  --warning: #FFB84D;
  --text: #F5F7FF;
  --text-muted: #8F9AB0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --header-height: 64px;
  --sidebar-width: 250px;
  --bottom-nav-height: 68px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(117, 104, 255, 0.25);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #B5ADFF;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p {
  color: var(--text-muted);
}

/* Custom App Inputs (NO Browser-default inputs!) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(117, 104, 255, 0.25);
  background-color: #1A2238;
}

input::placeholder,
textarea::placeholder {
  color: #657088;
}

/* Custom Checkbox */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-muted);
}
.custom-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background-color: var(--bg-card-sec);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s;
}
.custom-checkbox input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.custom-checkbox input[type="checkbox"]:checked::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #FFF;
  border-bottom: 2px solid #FFF;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* App Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5E4EFA 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(117, 104, 255, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #6E5FFA 100%);
  color: #FFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(117, 104, 255, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card-sec);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #202942;
  border-color: #3B4968;
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #22B872 100%);
  color: #07150E;
  font-weight: 700;
}
.btn-success:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #E83F5B 100%);
  color: #FFFFFF;
}
.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

/* Cards & Surfaces */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
}

.card-secondary {
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-success, .badge-win {
  background: rgba(53, 212, 140, 0.15);
  color: var(--success);
  border: 1px solid rgba(53, 212, 140, 0.3);
}
.badge-danger, .badge-loss {
  background: rgba(255, 95, 120, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 95, 120, 0.3);
}
.badge-warning, .badge-pending {
  background: rgba(255, 184, 77, 0.15);
  color: var(--warning);
  border: 1px solid rgba(255, 184, 77, 0.3);
}
.badge-info, .badge-draw {
  background: rgba(155, 145, 255, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(155, 145, 255, 0.3);
}

/* Admin Dashboard Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg);
}

/* Sidebar (Desktop) */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, #4B38DE 100%);
  border-radius: 10px;
  display: grid;
  place-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #FFF;
  box-shadow: 0 2px 10px rgba(117, 104, 255, 0.4);
}

.brand-text h2 {
  font-size: 16px;
  letter-spacing: -0.2px;
}
.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}
.nav-link:hover {
  color: var(--text);
  background-color: var(--bg-card-sec);
}
.nav-link.active {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(117, 104, 255, 0.2) 0%, rgba(117, 104, 255, 0.05) 100%);
  border-left: 3px solid var(--primary);
  font-weight: 600;
}
.nav-link .nav-icon {
  font-size: 18px;
  width: 22px;
  display: inline-block;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Admin Main Canvas */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Admin Top Header */
.admin-topbar {
  height: var(--header-height);
  background-color: rgba(17, 23, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid;
  place-content: center;
  cursor: pointer;
  position: relative;
  font-size: 16px;
  transition: all 0.2s;
}
.topbar-icon-btn:hover {
  background-color: #212B44;
  border-color: #3C4B6C;
}
.topbar-icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger);
}

.admin-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF6B8B 0%, var(--primary) 100%);
  display: grid;
  place-content: center;
  font-weight: 700;
  color: #FFF;
  border: 2px solid var(--border);
}

/* Dynamic Greeting & IST Clock Banner */
.admin-greeting-bar {
  background: linear-gradient(180deg, #131A2D 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.greeting-text h1 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}
.greeting-text p {
  font-size: 13px;
  color: var(--text-muted);
}
.ist-clock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
}
.clock-icon {
  font-size: 20px;
  color: var(--secondary);
}
.clock-details .date-line {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.clock-details .time-line {
  font-size: 15px;
  font-weight: 700;
  color: #FFF;
  letter-spacing: 0.5px;
}

/* Admin Content Container */
.admin-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #384666;
}
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-content: center;
  font-size: 20px;
}
.stat-icon.players { background: rgba(117, 104, 255, 0.15); color: var(--secondary); }
.stat-icon.matches { background: rgba(53, 212, 140, 0.15); color: var(--success); }
.stat-icon.deposits { background: rgba(255, 184, 77, 0.15); color: var(--warning); }
.stat-icon.withdrawals { background: rgba(255, 95, 120, 0.15); color: var(--danger); }

.stat-body .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-body .stat-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quick Access Grid */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.quick-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.quick-card:hover {
  background-color: var(--bg-card-sec);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.quick-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  display: grid;
  place-content: center;
  font-size: 20px;
  transition: all 0.2s;
}
.quick-card:hover .quick-icon-wrap {
  background-color: rgba(117, 104, 255, 0.2);
  border-color: var(--primary);
}
.quick-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.quick-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Data Tables & Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.data-table th {
  padding: 14px 18px;
  background-color: var(--bg-card-sec);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tr:hover td {
  background-color: rgba(23, 30, 48, 0.6);
}

/* Tabs UI */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text);
  border-color: #3B4B6E;
}
.tab-btn.active {
  background-color: var(--primary);
  color: #FFF;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(117, 104, 255, 0.4);
}

/* Settings Form Grid */
.settings-section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.settings-section-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.settings-section-header h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--secondary);
}
.settings-section-header p {
  font-size: 13px;
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.form-helper {
  font-size: 12px;
  color: var(--text-muted);
}
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-prefix {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.input-with-icon input {
  padding-left: 32px;
}

/* ==========================================================================
   User-Facing Mobile App Styles
   ========================================================================== */
.user-app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 80px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
}

.user-topbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(17, 23, 40, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--border);
}
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #3B2EAA 100%);
  border: 2px solid var(--border);
  display: grid;
  place-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
}
.user-meta-name {
  font-size: 15px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
}
.user-meta-id {
  font-size: 12px;
  color: var(--text-muted);
}

/* Wallet Card (User Home) */
.wallet-hero-card {
  margin: 20px;
  background: linear-gradient(135deg, #182038 0%, #101526 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.wallet-hero-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(117, 104, 255, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.wallet-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.wallet-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 6px 0 18px 0;
  letter-spacing: -0.5px;
}
.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Game Tier Cards Grid */
.game-modes-section {
  padding: 0 20px;
}
.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title-wrap h3 {
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #FFFFFF;
}

.game-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.game-tier-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, #151C2F 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.game-tier-card:hover, .game-tier-card:active {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(117, 104, 255, 0.3);
}
.game-tier-card .tier-stake {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.game-tier-card .tier-prize {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--success);
  margin: 6px 0;
}
.game-tier-card .tier-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 13px;
}

/* Matchmaking "Finding Opponent" Overlay */
.matchmaking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 18, 0.95);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.radar-spinner {
  width: 160px;
  height: 160px;
  position: relative;
  margin-bottom: 30px;
  display: grid;
  place-content: center;
}
.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: pulseRadar 2s cubic-bezier(0.1, 0.6, 0.3, 1) infinite;
}
.radar-ring:nth-child(2) { animation-delay: 0.6s; }
.radar-ring:nth-child(3) { animation-delay: 1.2s; }
.radar-center-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #4B38DE 100%);
  display: grid;
  place-content: center;
  font-size: 28px;
  color: #FFF;
  box-shadow: 0 0 30px rgba(117, 104, 255, 0.6);
  z-index: 2;
}

@keyframes pulseRadar {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* 16-Tile Interactive Game Board */
.game-stage-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
}
.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hud-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.hud-value {
  font-size: 20px;
  font-weight: 800;
  color: #FFF;
}
.hud-value.timer { color: var(--warning); }
.hud-value.score { color: var(--success); }

.tiles-board-16 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  aspect-ratio: 1;
  width: 100%;
}

.game-tile {
  background-color: var(--bg-card-sec);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  aspect-ratio: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: transparent;
  user-select: none;
  transition: transform 0.1s ease, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.game-tile:active {
  transform: scale(0.92);
}

.game-tile.target-active {
  background: linear-gradient(135deg, var(--primary) 0%, #513ED6 100%);
  border-color: #A397FF;
  box-shadow: 0 0 20px rgba(117, 104, 255, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  animation: tileGlowPulse 0.8s ease-in-out infinite alternate;
}

@keyframes tileGlowPulse {
  0% { transform: scale(0.97); }
  100% { transform: scale(1.03); }
}

.game-tile.hit-correct {
  background-color: var(--success) !important;
  border-color: #63FFAA !important;
  color: #07150E !important;
  transform: scale(1.08);
}
.game-tile.hit-wrong {
  background-color: var(--danger) !important;
  border-color: #FF8599 !important;
  color: #FFF !important;
}

/* User Bottom Navigation */
.user-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-height);
  background-color: rgba(17, 23, 40, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 95;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
  padding: 8px 14px;
}
.bottom-nav-item .nav-icon {
  font-size: 20px;
}
.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--primary);
}

/* Quick Amount Chips (Deposits) */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.amount-chip {
  background-color: var(--bg-card-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.amount-chip:hover, .amount-chip.active {
  background-color: rgba(117, 104, 255, 0.2);
  border-color: var(--primary);
  color: #FFF;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}
.modal-close-btn:hover { color: var(--text); }
.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: #FFF;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
}
.toast.success { border-color: var(--success); }
.toast.danger { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Responsive Adaptations & Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-access-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .menu-toggle-btn {
    display: block;
  }
  .admin-content {
    padding: 16px;
    gap: 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-greeting-bar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .ist-clock-card {
    width: 100%;
    justify-content: flex-start;
  }

  /* Table to Card View on Mobile */
  .mobile-cards-view .data-table,
  .mobile-cards-view thead,
  .mobile-cards-view tbody,
  .mobile-cards-view th,
  .mobile-cards-view td,
  .mobile-cards-view tr {
    display: block;
  }
  .mobile-cards-view thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .mobile-cards-view tr {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    padding: 14px 16px;
  }
  .mobile-cards-view td {
    border: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: normal;
  }
  .mobile-cards-view td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
  }
}

@media (max-width: 480px) {
  .stat-card {
    padding: 16px;
  }
  .stat-body .stat-number {
    font-size: 1.5rem;
  }
}

.auth-shell{min-height:100svh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 0,#28205d,#070912 62%)}.auth-card{width:min(440px,100%);padding:28px;border:1px solid #2b3450;border-radius:28px;background:#101626eF;box-shadow:0 30px 90px #0009}.brand-mark{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(135deg,#8376ff,#4b3ec3);font-weight:900;font-size:25px}.eyebrow{margin-top:18px;color:#9f96ff;font-size:11px;font-weight:900;letter-spacing:1.5px}.auth-card h1{margin:5px 0}.auth-card p{color:#8f9ab0}.auth-card label{display:block;margin:12px 0;font-size:12px;color:#aeb8cc;font-weight:700}.auth-card input{width:100%;margin-top:6px;padding:14px;border-radius:13px;border:1px solid #303a53;background:#0a0f1b;color:#fff}.checkline{display:flex!important;align-items:center;gap:9px}.checkline input{width:auto!important;margin:0}.auth-switch{display:block;text-align:center;margin-top:18px}.flash-msg{margin:10px 0;padding:12px 14px;border-radius:13px;border:1px solid #303a53;background:#172035}.flash-msg.danger{border-color:#673044;background:#3a1724;color:#ffb6c4}.flash-msg.success{border-color:#285a47;background:#143526;color:#b9ffdf}.mode-note{font-size:12px;color:#9f96ff}.top-actions{display:flex;gap:8px}.topbar-icon-btn{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#161d2e;border:1px solid #29334a;color:#fff}.fullscreen-game{position:fixed!important;inset:0;z-index:9999;min-height:100svh!important;width:100vw!important;max-width:none!important;padding:max(12px,env(safe-area-inset-top)) 12px 18px!important;background:radial-gradient(circle at 50% 10%,#28205a,#050711 58%)!important;display:flex!important;flex-direction:column!important}.fullscreen-game .tiles-board-16{flex:1;align-content:center}.fullscreen-game .game-hud{margin-top:4px}.fullscreen-game .game-help{margin-bottom:env(safe-area-inset-bottom)}body.game-active{overflow:hidden}.game-result-scoreboard{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin:18px 0}.score-card{padding:18px;border:1px solid #303a55;border-radius:18px;background:#121829;text-align:center}.score-card strong{display:block;font-size:38px;margin-top:4px}.score-card.you{border-color:#7468ff55}.score-card.bot{border-color:#ff647755}.profile-summary{display:grid;gap:5px;padding:15px;background:#111829;border:1px solid #2a344b;border-radius:16px}.kyc-status{margin:12px 0;padding:10px 12px;border-radius:12px;background:#1a2131}.kyc-status.verified{color:#8ff1c4}.kyc-status.rejected{color:#ff9bad}.kyc-status.auto_checked,.kyc-status.pending_review{color:#ffd58c}.history-row{display:flex;justify-content:space-between;padding:13px 0;border-bottom:1px solid #252d40}.history-row small{display:block;color:#8f9ab0;margin-top:3px}
.game-stage-container{position:relative}.game-tile{border:1px solid #29334a;background:linear-gradient(145deg,#141b2c,#0d1320);border-radius:18px;aspect-ratio:1;min-height:55px;touch-action:manipulation}.game-tile.target-active{background:radial-gradient(circle,#a69dff,#6256df 48%,#302978);box-shadow:0 0 30px #776aff;animation:targetPulse .6s infinite alternate}.game-tile.hit-correct{background:#246e52;box-shadow:0 0 20px #35d48c88}.game-tile.hit-wrong{background:#6e2639}.game-help{text-align:center;color:#8994aa;font-size:12px;padding:8px}.modal-overlay{z-index:10000}

.search-bar{display:flex;gap:10px}.search-bar input{flex:1;min-width:0}.action-stack{display:grid;gap:7px}.action-stack form{display:flex;gap:6px;flex-wrap:wrap}.action-stack input{min-width:150px;flex:1}

.admin-svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sidebar-nav .nav-link{display:flex;align-items:center;gap:11px}.nav-icon{width:20px;height:20px;display:grid;place-items:center}.nav-icon .admin-svg{width:18px;height:18px}
