/* ==========================================================================
   ADC PLATFORM & COIN RUSH — COMPREHENSIVE CYBERPUNK STYLESHEET
   100% Mobile-First & Responsive Across All Viewports (320px to 4K)
   ========================================================================== */

:root {
  --bg-dark: #070913;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --bg-input: #060812;
  --border-color: rgba(51, 65, 85, 0.8);
  --border-cyan: rgba(0, 240, 255, 0.35);
  --border-gold: rgba(255, 184, 0, 0.4);
  --border-purple: rgba(176, 38, 255, 0.4);
  
  --cyan-primary: #00F0FF;
  --cyan-hover: #33F3FF;
  --gold-primary: #FFB800;
  --gold-hover: #FFC933;
  --purple-primary: #B026FF;
  --emerald-primary: #10B981;
  --red-primary: #EF4444;
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Global Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  position: relative;
  background-color: #070913;
  color: #F8FAFC;
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

img, video, canvas, svg, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  max-width: 100%;
  font-family: inherit;
}

/* Background Ambient Glow */
.fixed-bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(176, 38, 255, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, #070913 0%, #0c1126 50%, #060810 100%);
  z-index: -10;
}

/* App Responsive Container */
.container-responsive {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-responsive {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Dashboard Core Layout — Mobile-First */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden !important;
}

@media (min-width: 768px) {
  .dashboard-layout {
    flex-direction: row;
  }
}

/* Desktop Sidebar */
.sidebar-desktop {
  display: none;
  width: 16rem;
  min-width: 16rem;
  flex-shrink: 0;
  flex-direction: column;
  background: rgba(6, 8, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(0, 240, 255, 0.15);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.admin-sidebar {
  border-right: 1px solid rgba(176, 38, 255, 0.2);
}

@media (min-width: 768px) {
  .sidebar-desktop {
    display: flex;
  }
}

/* Main Content Wrapper */
.main-content-wrapper {
  flex: 1 1 0%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .main-content-wrapper {
    padding-bottom: 2rem;
  }
}

/* Topbar Header for Desktop */
.topbar-desktop {
  display: none;
  height: 4rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  background: rgba(6, 8, 16, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 2rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
}

@media (min-width: 768px) {
  .topbar-desktop {
    display: flex;
  }
}

/* Mobile Top Navigation Header */
.mobile-top-header {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: calc(3.5rem + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 0.75rem 0;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 8, 16, 0.95);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 45;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .mobile-top-header {
    display: none !important;
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: calc(3.85rem + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(6, 8, 16, 0.96);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94A3B8;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  min-width: 48px;
  min-height: 44px;
}
.nav-tab.active {
  color: #00F0FF;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #94A3B8;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nav-item:hover {
  color: #FFF;
  background: rgba(15, 23, 42, 0.7);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.18) 0%, rgba(79, 70, 229, 0.18) 100%);
  color: #00F0FF;
  border: 1px solid rgba(0, 240, 255, 0.4);
}
.admin-nav.active {
  background: linear-gradient(90deg, rgba(176, 38, 255, 0.2) 0%, rgba(79, 70, 229, 0.2) 100%);
  color: #D8B4FE;
  border: 1px solid rgba(176, 38, 255, 0.4);
}
.nav-highlight {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: #00F0FF;
}
.nav-icon {
  margin-right: 0.65rem;
  font-size: 1.1rem;
}

/* Glass Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 1.25rem;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: all 0.25s ease;
}

@media (min-width: 640px) {
  .glass-card {
    border-radius: 1.5rem;
    padding: 1.5rem;
  }
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
}

.border-cyan-glow {
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 240, 255, 0.12);
}
.border-gold-glow {
  border: 1px solid rgba(255, 184, 0, 0.4);
  box-shadow: 0 10px 25px -5px rgba(255, 184, 0, 0.12);
}
.border-purple-glow {
  border: 1px solid rgba(176, 38, 255, 0.4);
  box-shadow: 0 10px 25px -5px rgba(176, 38, 255, 0.12);
}

.gradient-text-gold {
  background: linear-gradient(135deg, #FFF 0%, #00F0FF 50%, #FFB800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gradient-text-purple {
  background: linear-gradient(135deg, #FFF 0%, #B026FF 50%, #00F0FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 0.875rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1.2;
  min-height: 44px;
  max-width: 100%;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary, .btn-cyan {
  background: linear-gradient(135deg, #00F0FF 0%, #4F46E5 100%);
  color: #000 !important;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
}
.btn-primary:hover, .btn-cyan:hover {
  background: linear-gradient(135deg, #33F3FF 0%, #6366F1 100%);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}
.btn-gold {
  background: linear-gradient(135deg, #FFB800 0%, #D97706 100%);
  color: #000 !important;
  box-shadow: 0 4px 15px rgba(255, 184, 0, 0.35);
}
.btn-purple {
  background: linear-gradient(135deg, #B026FF 0%, #4F46E5 100%);
  color: #FFF !important;
  box-shadow: 0 4px 15px rgba(176, 38, 255, 0.35);
}
.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #F8FAFC !important;
}
.btn-secondary:hover {
  border-color: #00F0FF;
  color: #FFF !important;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.625rem;
  min-height: 36px;
}
.btn-block {
  display: flex;
  width: 100%;
}

/* Balance Pill */
.coin-balance-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  text-decoration: none;
  transition: all 0.2s ease;
}
.coin-balance-pill:hover {
  border-color: #FFB800;
}

.mobile-coin-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: 9999px;
  color: #FFB800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.icon-btn-box {
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: #0B0F19;
  border: 1px solid #1E293B;
  color: #94A3B8;
  text-decoration: none;
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
}
.icon-btn-box:hover {
  color: #FFF;
  border-color: #00F0FF;
}
.notif-dot {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background: #00F0FF;
  color: #000;
  font-size: 0.6rem;
  font-weight: 900;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress Bar */
.progress-bar-bg {
  width: 100%;
  height: 0.75rem;
  background: #060812;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 9999px;
  overflow: hidden;
  padding: 2px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00F0FF 0%, #B026FF 50%, #FFB800 100%);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  transition: width 0.4s ease;
}

/* Tables (Horizontal Scroll Container for Mobile) */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}
table.adc-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 520px;
}
table.adc-table th {
  padding: 0.75rem 0.85rem;
  color: #94A3B8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #1E293B;
  white-space: nowrap;
}
table.adc-table td {
  padding: 0.85rem 0.85rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  font-weight: 500;
}
table.adc-table tbody tr:hover {
  background: rgba(6, 8, 18, 0.4);
}

/* Badge Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-cyan { background: rgba(0, 240, 255, 0.15); color: #67e8f9; border: 1px solid rgba(0, 240, 255, 0.3); }
.badge-gold { background: rgba(255, 184, 0, 0.15); color: #fde047; border: 1px solid rgba(255, 184, 0, 0.3); }
.badge-purple { background: rgba(176, 38, 255, 0.15); color: #d8b4fe; border: 1px solid rgba(176, 38, 255, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8;
  margin-bottom: 0.35rem;
}
.form-control {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.75rem;
  background: #060812;
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #FFF;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-control:focus {
  border-color: #00F0FF;
}
textarea.form-control {
  height: auto;
  padding: 0.75rem 1rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 16, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-content {
  background: #0E1322;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 1.5rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 30rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.25rem;
  cursor: pointer;
}
.modal-close:hover { color: #FFF; }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.alert-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; }
.alert-info { background: rgba(0, 240, 255, 0.15); border: 1px solid rgba(0, 240, 255, 0.4); color: #67e8f9; }

/* Custom Animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.animate-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* ==========================================================================
   MOBILE GAME FULL-VIEWPORT STYLES (Header + Game Fill + Footer)
   ========================================================================== */

@media (max-width: 767px) {
  .game-page-layout {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .game-main-wrapper {
    height: calc(100dvh - 3.5rem - 3.85rem) !important;
    min-height: calc(100dvh - 3.5rem - 3.85rem) !important;
    max-height: calc(100dvh - 3.5rem - 3.85rem) !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    flex: 1 1 auto !important;
  }

  .game-container-mobile-fill {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 100% !important;
  }
}

@media (min-width: 768px) {
  .game-container-mobile-fill {
    width: 100%;
    max-width: 540px;
    height: 78vh;
    max-height: 840px;
    min-height: 560px;
    margin: 0 auto 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 240, 255, 0.15);
    overflow: hidden;
  }
}
