/* =========================================
   css/games.css - Arcade Hub Styles
========================================= */

/* Hero Section */
.games-hero {
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e1b4b 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.games-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  pointer-events: none;
}

.games-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 50px;
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.games-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.games-hero-title span {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.games-hero-subtitle {
  color: #94a3b8;
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Controls & Search */
.games-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.games-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.games-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.8rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 50px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.games-search-input::placeholder {
  color: #64748b;
}

.games-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.games-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Category Filter Tabs */
.games-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.filter-btn {
  padding: 0.55rem 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #818cf8;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Main Games Section */
.games-section {
  padding: 4rem 0 6rem;
  background-color: var(--color-bg-alt, #f8fafc);
  min-height: 500px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Game Card */
.game-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.game-card-media {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-card-media-bg {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transition: transform 0.5s ease;
}

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

.game-card-icon-wrapper {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.8rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-icon-wrapper {
  transform: scale(1.1) rotate(-3deg);
}

.game-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-3d {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  color: #ffffff;
}

.badge-action {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
}

.badge-racing {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.badge-casual {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
}

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

.game-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.game-card-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.game-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono, monospace);
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.play-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.play-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Empty State */
.games-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #64748b;
  grid-column: 1 / -1;
}

.games-empty i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.games-empty h3 {
  font-size: 1.25rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .games-hero {
    padding: 4.5rem 0 3rem;
  }
  .games-hero-title {
    font-size: 2rem;
  }
  .games-hero-subtitle {
    font-size: 1rem;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}
