@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(236, 72, 153, 0.25));
  --border-subtle: rgba(255, 255, 255, 0.08);
}

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

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
}

/* Header & Navbar */
.navbar-custom {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
}

.navbar-brand-logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link-custom {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
}

/* Category Pills Bar - Clean, Professional Horizontal Scroll without Scrollbars */
.category-scroll-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.65rem 0.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

.category-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

.btn-category-pill {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-category-pill i {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.btn-category-pill:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-category-pill:hover i {
  transform: scale(1.15);
}

.btn-category-pill.active {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.45);
  transform: translateY(-1px);
}

/* Category Scroll Arrow Buttons */
.category-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.category-scroll-btn.show {
  opacity: 1;
  visibility: visible;
}

.category-scroll-btn:hover {
  background: var(--accent-purple);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.scroll-left-btn {
  left: 12px;
}

.scroll-right-btn {
  right: 12px;
}

/* Hero Section */
.hero-banner {
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 50%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.15), transparent 50%);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
}

.game-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 65%;
  overflow: hidden;
  background: #090d16;
}

.game-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-thumb {
  transform: scale(1.08);
}

.game-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
}

.game-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.btn-play {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.45rem 1rem;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: auto;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-play:hover {
  color: #fff;
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

/* Category Grid Card */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-main);
  display: block;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  color: #fff;
}

.category-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-glow);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-purple);
  margin-bottom: 1rem;
}

/* Game Player Canvas Container */
.player-container {
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.game-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
}

@media (max-width: 768px) {
  .game-iframe-wrapper {
    height: 420px;
  }
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-controls {
  background: var(--bg-card);
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ad Boxes */
.ad-banner-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Footer */
footer {
  margin-top: auto;
  background: #0b1120;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0 1.5rem 0;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Search Bar & Live Autocomplete Suggestions Styling */
.search-container-box {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-input-group {
  border-radius: 50px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #0f172a;
}

.search-input-group:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.search-input-group .input-group-text {
  background: #0f172a !important;
  border: none;
  color: #a855f7 !important;
  padding-left: 18px;
  font-size: 1.15rem;
}

.search-input-group .form-control {
  background: #0f172a !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 0.98rem;
  padding: 10px 18px 10px 8px;
  box-shadow: none !important;
}

.search-input-group .form-control::placeholder {
  color: var(--text-muted);
}

.search-suggestions-popup {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  margin-top: 6px;
  display: none;
  overflow: hidden;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #f8fafc;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
}

/* Mobile Search Bar Toggle Styles */
@media (max-width: 991.98px) {
  .mobile-search-wrapper {
    display: none;
    width: 100%;
    padding: 10px 0 4px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    animation: slideDown 0.25s ease forwards;
  }

  .mobile-search-wrapper.show {
    display: block;
  }

  .search-container-box {
    max-width: 100%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
