/* ==========================================================================
   CasinoGuru Hub - Design System & Stylesheet (With Mobile Bar & FOMO Toast)
   ========================================================================== */

:root {
  /* Dark Slate & Emerald Color System */
  --bg-dark: #0D131A;
  --bg-surface: #16212D;
  --bg-surface-hover: #1F2E3D;
  --bg-header: rgba(13, 19, 26, 0.9);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(34, 197, 94, 0.3);

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* Accent Colors */
  --emerald-primary: #22C55E;
  --emerald-hover: #16A34A;
  --emerald-glow: rgba(34, 197, 94, 0.2);

  --safety-very-high: #22C55E;
  --safety-high: #10B981;
  --safety-above-avg: #EAB308;
  --safety-low: #EF4444;

  --accent-cyan: #06B6D4;
  --accent-purple: #A855F7;
  --accent-gold: #F59E0B;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Glassmorphism Effects */
  --glass-bg: rgba(22, 33, 45, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.04) 0%, transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.04) 0%, transparent 35%);
  background-attachment: fixed;
  padding-bottom: 50px;
}

/* MOBILE-FIRST STICKY FLOATING BONUS BAR */
.mobile-sticky-bonus-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: #090D12;
  border-top: 2px solid var(--emerald-primary);
  padding: 8px 1.25rem;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.8);
}

/* REAL-TIME FOMO ACTIVITY TOAST */
.fomo-activity-toast {
  position: fixed;
  bottom: 65px;
  left: 20px;
  z-index: 1600;
  background: #16212D;
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* AFFILIATE DISCLOSURE TOP BAR */
.affiliate-disclosure-bar {
  background: rgba(6, 182, 212, 0.08);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
  padding: 5px 1.5rem;
  font-size: 0.75rem;
  color: #38BDF8;
  text-align: center;
}

.disclosure-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
}

.logo-highlight {
  color: var(--emerald-primary);
  margin-left: 2px;
}

.logo-tagline {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Global Search Input */
.nav-search {
  position: relative;
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.6rem 2.5rem;
  color: #FFF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--emerald-primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

/* Country Selector Styling */
.country-selector-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.country-select {
  background-color: #16212D !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #F1F5F9 !important;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.country-select option {
  background-color: #16212D !important;
  color: #F1F5F9 !important;
  padding: 8px 12px;
}

.country-select:focus {
  border-color: var(--emerald-primary) !important;
  box-shadow: 0 0 0 2px var(--emerald-glow);
}

/* Bonus Subnav Pills */
.bonus-subnav-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  border-color: var(--emerald-primary);
  color: var(--text-main);
}

.pill-btn.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

/* Nav Right Stat Pill */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 20px;
  border: var(--glass-border);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.green-dot { background: var(--emerald-primary); }

/* Subnav Tabs */
.subnav {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.subnav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.nav-tab.active {
  color: var(--emerald-primary);
  border-bottom-color: var(--emerald-primary);
}

.tab-badge {
  font-size: 0.65rem;
  background: rgba(34, 197, 94, 0.15);
  color: var(--emerald-primary);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-emerald {
  background: var(--emerald-primary);
  color: #052E16;
}
.btn-emerald:hover {
  background: var(--emerald-hover);
  box-shadow: 0 4px 16px var(--emerald-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}
.btn-full { width: 100%; }

/* Hero Section */
.hero-section {
  max-width: 1400px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.hero-content {
  background: linear-gradient(135deg, rgba(22, 33, 45, 0.9), rgba(15, 23, 34, 0.9));
  border: var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 12px;
  border: var(--glass-border);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 170px;
}

.filter-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-select {
  background-color: #16212D !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFF !important;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.filter-select option {
  background-color: #16212D !important;
  color: #FFF !important;
}

.filter-select:focus {
  border-color: var(--emerald-primary) !important;
}

/* Main Layout & Tab Content */
.main-layout {
  max-width: 1400px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Casino List Grid */
.casino-list-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.casino-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 200px 1fr 180px 180px;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.casino-card:hover {
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
}

.casino-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 10px;
  border: var(--glass-border);
  min-height: 90px;
}

.casino-logo-img {
  max-width: 140px;
  max-height: 50px;
  object-fit: contain;
  margin-bottom: 4px;
}

.casino-logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFF;
}

.casino-license {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.casino-details h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.bonus-highlight {
  font-size: 0.95rem;
  color: var(--emerald-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.features-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.safety-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.safety-score {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.safety-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
}

.badge-very-high { background: rgba(34, 197, 94, 0.15); color: var(--safety-very-high); }
.badge-high { background: rgba(16, 185, 129, 0.15); color: var(--safety-high); }
.badge-above-avg { background: rgba(234, 179, 8, 0.15); color: var(--safety-above-avg); }

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

/* Modal Overlay & Custom Inputs */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(13, 19, 26, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-container {
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem;
}

.custom-input, .custom-select, .custom-textarea {
  width: 100%;
  background-color: #16212D !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: #FFF !important;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}

.custom-select option {
  background-color: #16212D !important;
  color: #FFF !important;
}

.custom-input:focus, .custom-select:focus, .custom-textarea:focus {
  border-color: var(--emerald-primary) !important;
}

.form-group {
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-row {
  display: flex;
  gap: 0.85rem;
}

.form-row .form-group { flex: 1; }

/* CRC Section */
.crc-hero-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.crc-metrics {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.crc-metric {
  display: flex;
  flex-direction: column;
}

.crc-metric .m-val {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--emerald-primary);
}

.crc-metric .m-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.complaint-ticket {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.complaint-ticket:hover {
  border-color: var(--emerald-primary);
  transform: translateX(4px);
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.status-resolved { background: rgba(34, 197, 94, 0.2); color: #4ADE80; }
.status-investigating { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }

/* Calculators Layout */
.calculators-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.calc-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.ev-result-box {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ev-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.ev-pos { color: var(--emerald-primary); font-weight: 700; }
.ev-neg { color: #F87171; font-weight: 700; }

.bj-result-box {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

.bj-move-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.badge-stand { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.badge-hit { background: rgba(34, 197, 94, 0.2); color: #4ADE80; }
.badge-split { background: rgba(168, 85, 247, 0.2); color: #C084FC; }

.bj-reason {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: #090D12;
  border-top: var(--glass-border);
  padding: 3rem 1.5rem 1.5rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
}

.footer-col h4 {
  color: #FFF;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--emerald-primary);
}

.rg-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rg-badge {
  border: 1px solid var(--text-dim);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .casino-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .casino-actions {
    flex-direction: row;
    justify-content: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}
