/* ==========================================================================
   Nexus GameHub - Light Theme Gaming Portal Stylesheet
   Modern, Ultra-Crisp Light Aesthetics & Refined Micro-Interactions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-deep: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #4f46e5;
  --border-glow: rgba(79, 70, 229, 0.2);

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.25);
  --cyan-primary: #0284c7;
  --blue-vibrant: #2563eb;
  --purple-neon: #7c3aed;
  --emerald-live: #059669;
  --amber-gold: #d97706;
  --amber-coin: #fbbf24;
  --rose-hot: #e11d48;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

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

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: #f8fafc;
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Background Ambient Lighting */
.ambient-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.portal-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  transition: var(--transition-smooth);
}

.portal-brand:hover .brand-icon {
  transform: scale(1.06) rotate(3deg);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 40px;
  color: var(--text-main);
  font-size: 13px;
  width: 250px;
  transition: var(--transition-smooth);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  width: 290px;
}

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

.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-portal-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.btn-portal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38);
}

.btn-portal-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-portal-outline:hover {
  background: var(--bg-secondary);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ==========================================================================
   Category & Filter Tabs Bar
   ========================================================================== */
.games-filter-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.filter-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #94a3b8;
}

.filter-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.games-counter-badge {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   Category-Wise Game Showcase Grid (Only Game Image and Name)
   ========================================================================== */
.games-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px 80px;
}

.category-section {
  margin-bottom: 48px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.4px;
}

.category-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.simple-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Minimalist Clean Light Game Card */
.game-simple-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.game-simple-card:hover {
  transform: translateY(-6px);
  border-color: #818cf8;
  box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(79, 70, 229, 0.08);
}

.game-simple-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.game-simple-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-simple-card:hover .game-simple-img {
  transform: scale(1.06);
}

.game-simple-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.game-simple-card:hover .game-simple-play-overlay {
  opacity: 1;
}

.simple-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.35);
  transform: scale(0.85);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-simple-card:hover .simple-play-btn {
  transform: scale(1);
}

.game-simple-name {
  padding: 16px 18px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.3px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   Access Required Modal (Operator B2B Exclusive)
   ========================================================================== */
.play-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.play-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.play-modal-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
  width: 100%;
  max-width: 480px;
  padding: 44px 36px;
  text-align: center;
  position: relative;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.portal-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
}

@media (max-width: 768px) {
  .portal-nav-container {
    flex-wrap: wrap;
  }
  .search-input {
    width: 180px;
  }
  .search-input:focus {
    width: 220px;
  }
  .simple-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}
