/* =========================================== */
/*       TAGS PAGE - MODERN PREMIUM THEME      */
/* =========================================== */

/* 1. TAGS HERO SECTION */
.section-tags-hero {
  padding: 140px 0 60px;
  margin-top: 0;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-tags-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    conic-gradient(from 0deg at 50% 50%, rgba(99, 102, 241, 0.1) 0deg, transparent 60deg, transparent 300deg, rgba(236, 72, 153, 0.1) 360deg);
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
}

.section-tags-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #f8fafc 20%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  text-shadow: none;
}

.section-tags-hero p {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

/* 2. TAG GAMES SECTION */
.section-tag-games {
  padding: var(--spacing-1xl) 0;
  background: var(--color-bg-primary);
}

/* 3. PAGE HEADER */
.header-tags-page {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

.header-tags-page h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  background: none;
  -webkit-text-fill-color: initial;
}

.header-tags-page .tag-h2 {
  margin: 0 auto;
  max-width: 820px;
  padding: 10px 16px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* 4. GAME CARDS */
.card-game {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.card-game:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 255, 255, 0.1);
}

.card-game::after {
  display: none;
}

.container-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: var(--color-bg-tertiary);
  border-radius: 0; /* Reset */
}

.placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  flex-direction: column;
}

.placeholder-content {
  text-align: center;
  color: var(--color-text-muted);
}

.placeholder-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--spacing-xs);
  opacity: 1;
  color: var(--color-text-muted);
}

.placeholder-text {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-muted);
}

.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

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

/* Image loading logic classes */
.placeholder-image {display: none; }
.game-image.loading + .placeholder-image {display: flex; }
.game-image.error {display: none; }
.game-image.error + .placeholder-image {display: flex; }

.container-game-info {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  background: var(--color-bg-card);
}

.title-game {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: left;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  margin-bottom: 0.25rem;
}
/* 5. MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .section-tags-hero {
    padding: 100px 0 40px;
  }

  .section-tags-hero h1 {
    font-size: 2rem;
  }

  .header-tags-page {
    margin-bottom: 30px;
  }

  .header-tags-page h1 {
    font-size: 2rem;
  }

  .header-tags-page .tag-h2 {
    font-size: 0.9rem;
    line-height: 1.55;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .section-tags-hero h1 {
    font-size: 1.75rem;
  }

  .header-tags-page h1 {
    font-size: 1.5rem;
  }

  .header-tags-page .tag-h2 {
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 7px 10px;
    border-radius: 10px;
  }
  
  .card-game {
    box-shadow: none;
    border: none;
    background: transparent;
  }
  
  .container-game-info {
    padding: 8px 0;
    background: transparent;
  }
}

/* Empty state for no results */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  margin: 40px 0;
  min-height: 300px;
  width: 100%;
  box-sizing: border-box;
  grid-column: 1 / -1;
}

.no-results::before {
  content: '🔍';
  font-size: 3rem;
  margin-bottom: 20px;
  filter: none;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--color-text-primary);
  background: none;
  -webkit-text-fill-color: initial;
}

.no-results p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 500px;
  line-height: 1.6;
}

.container-game-info .game-star {
  margin: 4px 0 2px;
  color: #ffb300;
  font-size: 0.84rem;
  line-height: 1;
}
