/* ==============================================================
   GAMBLER GIRL DISCORD BOT & DASHBOARD - LUXURY CYBER-DARK THEME
   Design System: Obsidian Glass, Neon Gold (#fefe43), Emerald (#0af5a7), Pink (#ff2a5f)
   Typography: Epilogue & Outfit
   ============================================================== */

:root {
  --bg-core: #090b10;
  --bg-surface: #10131c;
  --bg-surface-elevated: #161a26;
  --bg-surface-hover: #1e2436;
  --bg-glass: rgba(16, 19, 28, 0.75);
  --bg-glass-elevated: rgba(22, 26, 38, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(254, 254, 67, 0.4);
  --border-focus: #fefe43;

  --accent-gold: #fefe43;
  --accent-gold-glow: rgba(254, 254, 67, 0.25);
  --accent-emerald: #0af5a7;
  --accent-emerald-glow: rgba(10, 245, 167, 0.25);
  --accent-pink: #ff2a5f;
  --accent-pink-glow: rgba(255, 42, 95, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #06b6d4;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090b10;

  --discord-bg: #2b2d31;
  --discord-dark: #1e1f22;
  --discord-text: #dbdee1;
  --discord-btn-bg: #4e5058;
  --discord-blurple: #5865f2;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-gold-glow);

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-core);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(254, 254, 67, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(10, 245, 167, 0.02) 0%, transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Epilogue', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* App Header & Navigation Bar */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-crown-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fefe43, #f59e0b);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 0 20px rgba(254, 254, 67, 0.35);
}

.brand-title-wrap h1 {
  font-size: 1.25rem;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
  color: #000;
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.status-dot.active {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.status-dot.warning {
  background: #f59e0b;
}

.header-cta-btn {
  background: linear-gradient(135deg, #fefe43 0%, #facc15 100%);
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 4px 15px rgba(254, 254, 67, 0.25);
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 254, 67, 0.4);
}

/* Secondary Navigation Tabs */
.nav-tabs-wrapper {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.25rem 2rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
}

.nav-tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-primary);
}

.nav-tab-btn.active .tab-badge {
  background: var(--accent-gold);
  color: #000;
}

/* Main Container Layout */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Tab Content Visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats Overview Grid */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-icon.gold { background: rgba(254, 254, 67, 0.15); color: var(--accent-gold); }
.stat-icon.emerald { background: rgba(10, 245, 167, 0.15); color: var(--accent-emerald); }
.stat-icon.pink { background: rgba(255, 42, 95, 0.15); color: var(--accent-pink); }
.stat-icon.indigo { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }

.stat-info .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Epilogue', sans-serif;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-info .stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==============================================================
   PROMOTION SHARING & EMBED PREVIEW PANEL (CORE FEATURE)
   ============================================================== */
.promo-dispatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 960px) {
  .promo-dispatch-grid {
    grid-template-columns: 1fr;
  }
}

.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.panel-header {
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-select, .form-input, .form-textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.form-select option {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #fefe43 0%, #facc15 100%);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.95rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Epilogue', sans-serif;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 4px 18px rgba(254, 254, 67, 0.25);
  margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(254, 254, 67, 0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Discord Live Embed Simulation Box */
.discord-preview-container {
  background: var(--discord-dark);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.discord-channel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.discord-message-mock {
  display: flex;
  gap: 1rem;
}

.discord-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fefe43, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  flex-shrink: 0;
}

.discord-message-content {
  flex: 1;
}

.discord-user-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.discord-username {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.discord-bot-tag {
  background: var(--discord-blurple);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.discord-timestamp {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.discord-mention-text {
  color: var(--accent-gold);
  background: rgba(254, 254, 67, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* The Exact Discord Embed Box */
.discord-embed-card {
  background: var(--discord-bg);
  border-left: 4px solid var(--accent-gold);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  max-width: 520px;
  position: relative;
  margin-top: 0.5rem;
}

.embed-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.embed-title {
  color: #00a8fc;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.embed-description {
  color: var(--discord-text);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  white-space: pre-line;
}

.embed-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.embed-field-full {
  grid-column: span 2;
}

.embed-field-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.embed-field-value {
  font-size: 0.82rem;
  color: var(--discord-text);
}

.embed-thumbnail-img {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  object-fit: contain;
  padding: 4px;
}

.embed-footer {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.embed-footer-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.discord-action-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.discord-btn {
  background: var(--discord-btn-bg);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: default;
}

/* ==============================================================
   CASINO DATABASE GRID & CARDS
   ============================================================== */
.casinos-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding-left: 2.5rem;
}

.casinos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.casino-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.casino-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.casino-card-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.casino-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.casino-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.casino-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.casino-meta-title h3 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.casino-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-featured { background: var(--accent-emerald); color: #000; }
.badge-exclusive { background: var(--accent-pink); color: #fff; }

.casino-offer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.casino-offer-subtext {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.casino-terms-box {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 1.25rem;
  max-height: 65px;
  overflow-y: auto;
}

.casino-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-share-promo {
  flex: 1;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-share-promo:hover {
  background: #fff;
}

.btn-secondary-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary-icon:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==============================================================
   FEATURE TOGGLES SECTION
   ============================================================== */
.toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.toggle-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: var(--transition-normal);
}

.toggle-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.toggle-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.toggle-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Custom iOS/Modern Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .slider {
  background-color: var(--accent-gold);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #000;
}

/* ==============================================================
   TABLES: MODERATION LOGS & FEEDS
   ============================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: var(--bg-surface-elevated);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-table tr:hover td {
  background: var(--bg-surface-hover);
}

.badge-action {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-ban { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-kick { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-timeout { background: rgba(99, 102, 241, 0.2); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.4); }
.badge-warn { background: rgba(234, 179, 8, 0.2); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-automod { background: rgba(10, 245, 167, 0.2); color: #0af5a7; border: 1px solid rgba(10, 245, 167, 0.4); }

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast.success { border-color: var(--accent-emerald); }
.toast.error { border-color: var(--accent-pink); }
.toast.info { border-color: var(--accent-gold); }

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

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}
