/* ==========================================================================
   DISCOVERY CATALOG STYLESHEET (catalog.css)
   City promo lookbook with modern dark aesthetics & high responsiveness
   ========================================================================== */

:root {
  --brand-primary: #E11D48;
  --brand-glow: rgba(225, 29, 72, 0.4);
  --bg-main: #0B0F19;
  --bg-surface: #151D30;
  --bg-surface-elevated: #1E293B;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent-gold: #F59E0B;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-fire: #EF4444;
  --accent-fire-glow: rgba(239, 68, 68, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: max(10px, var(--safe-top)) 16px 10px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #FFFFFF;
}

.logo-symbol {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #F59E0B, #E11D48);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.logo-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.city-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.city-selector-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.city-pin { font-size: 13px; }
.city-arrow { font-size: 10px; color: var(--text-muted); }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lang-opt.active { color: #FFFFFF; }
.lang-sep { opacity: 0.3; }

.btn-builder-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand-primary), #BE123C);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--brand-glow);
  transition: transform 0.15s ease;
}

.btn-builder-header:active {
  transform: scale(0.96);
}

@media (max-width: 600px) {
  .btn-text-desktop {
    display: none;
  }
  .btn-builder-header {
    padding: 7px 10px;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.catalog-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  width: 100%;
}

.catalog-hero {
  position: relative;
  text-align: center;
  padding: 20px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 180px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero-heading {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
  max-width: 680px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-heading { font-size: 38px; }
}

.text-gradient {
  background: linear-gradient(135deg, #F59E0B 0%, #E11D48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.5;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

/* Category Chips */
.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.chip.active {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   GAMES DISCOVERY GRID
   ========================================================================== */

.games-section {
  width: 100%;
  margin-bottom: 40px;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Game Card */
.game-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.game-card-banner-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: #0F172A;
  overflow: hidden;
}

.game-card-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-banner {
  transform: scale(1.05);
}

.game-card-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 29, 48, 0.9) 0%, transparent 60%);
}

.game-card-logo {
  position: absolute;
  bottom: 12px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background: #000000;
}

.game-card-category {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.game-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 14px;
}

.game-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-card-title {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.game-card-prize {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1.35;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.prizes-left-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.prizes-left-badge.pulse-red {
  color: #F87171;
  animation: fomoTextPulse 1.4s infinite ease-in-out;
}

@keyframes fomoTextPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.btn-play-game {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand-primary), #BE123C);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--brand-glow);
  transition: transform 0.15s ease;
}

.btn-play-game:active {
  transform: scale(0.95);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-surface);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 440px;
  margin: 0 auto;
}

.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.btn-create-first {
  display: inline-block;
  background: var(--brand-primary);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   B2B BANNER SECTION
   ========================================================================== */

.b2b-banner-section {
  width: 100%;
}

.b2b-banner-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .b2b-banner-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.b2b-tag {
  display: inline-block;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid var(--brand-primary);
  color: #FB7185;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.b2b-banner-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.b2b-banner-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 580px;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #BE123C 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--brand-glow);
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.btn-primary-glow:active {
  transform: scale(0.97);
}

/* ==========================================================================
   CITY MODAL PICKER
   ========================================================================== */

.city-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

.city-modal-dialog {
  width: 100%;
  max-width: 360px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.city-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.city-modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

.btn-close-modal {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.city-item {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.city-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.city-item.selected {
  background: rgba(225, 29, 72, 0.15);
  border-color: var(--brand-primary);
  color: #FFFFFF;
}

.city-item-check {
  display: none;
  color: var(--brand-primary);
  font-weight: 900;
}

.city-item.selected .city-item-check {
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.catalog-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 16px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

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

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover { color: #FFFFFF; }

.footer-link-subtle {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
}
