/* ============================================
   Home Page Styles
   ============================================ */

/* Hero Carousel */
.hero-carousel {
  position: relative;
  height: 62vh;
  min-height: 460px;
  margin-top: 24px;
  overflow: hidden;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  border: 1px solid var(--border-dim);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6,6,20,0.85) 0%, rgba(6,6,20,0.4) 40%, transparent 70%),
    linear-gradient(180deg, transparent 40%, rgba(6,6,20,0.85));
}
.hero-content {
  position: absolute;
  left: 48px;
  bottom: 48px;
  max-width: 620px;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--neon-amber);
  border: 1px solid var(--neon-amber);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  box-shadow: var(--glow-amber);
  margin-bottom: 16px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--neon-amber);
  border-radius: 50%;
  box-shadow: var(--glow-amber);
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-shadow:
    2px 0 rgba(255,46,136,0.4),
    -2px 0 rgba(0,229,255,0.4),
    0 0 40px rgba(0,229,255,0.2);
}
.hero-tags {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.hero-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-free {
  padding: 4px 12px;
  border: 1px solid var(--neon-cyan);
  background: rgba(0, 229, 255, 0.08);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hero-score {
  color: var(--neon-amber);
  font-weight: 700;
  text-shadow: var(--glow-amber);
}
.hero-dev {
  color: var(--text-muted);
}

/* Hero HUD (side info) */
.hero-hud {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  text-align: right;
  z-index: 3;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-shadow: var(--glow-cyan-sm);
}
.hero-hud .line1 { opacity: 0.7; }
.hero-hud .line2 { color: var(--neon-magenta); text-shadow: 0 0 8px rgba(255,46,136,0.6); }

/* Hero indicators */
.hero-dots {
  position: absolute;
  right: 32px; bottom: 32px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dots button {
  width: 32px; height: 4px;
  background: rgba(255,255,255,0.2);
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
.hero-dots button.active {
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
  width: 48px;
}

/* Hero side HUD */
.hero-hud {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  text-align: right;
  z-index: 3;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-shadow: var(--glow-cyan-sm);
}
.hero-hud .line1 { opacity: 0.7; }
.hero-hud .line2 { color: var(--neon-magenta); text-shadow: 0 0 8px rgba(255,46,136,0.6); }

/* Category tiles */
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-tile {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  background: var(--bg-panel);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.3s, transform 0.5s;
  filter: saturate(1.2) hue-rotate(-6deg);
}
.cat-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,46,136,0.15), rgba(0,229,255,0.15)),
    linear-gradient(180deg, transparent, rgba(6,6,20,0.9));
  z-index: 1;
}
.cat-tile:hover {
  transform: translateY(-4px);
  border-color: var(--neon-magenta);
  box-shadow: var(--glow-magenta-sm);
}
.cat-tile:hover img {
  opacity: 0.8;
  transform: scale(1.08);
}
.cat-tile .cat-name {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.cat-tile .cat-count {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.06em;
}

/* Games grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.games-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}
.games-grid.five-col {
  grid-template-columns: repeat(5, 1fr);
}

/* Section header */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
  position: relative;
}
.section-head::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 120px; height: 2px;
  background: linear-gradient(90deg, var(--neon-magenta), transparent);
  box-shadow: var(--glow-magenta-sm);
}
.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.section-more {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: text-shadow 0.2s;
}
.section-more:hover {
  text-shadow: var(--glow-cyan-sm);
}

.games-section {
  margin-top: 48px;
}

/* Ranking list */
.ranking-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rank-col {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  padding: 16px;
}
.rank-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank-col-title .dot {
  width: 8px; height: 8px;
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.rank-col-title.magenta { color: var(--neon-magenta); }
.rank-col-title.magenta .dot { background: var(--neon-magenta); box-shadow: var(--glow-magenta-sm); }
.rank-col-title.amber { color: var(--neon-amber); }
.rank-col-title.amber .dot { background: var(--neon-amber); box-shadow: var(--glow-amber); }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.rank-item:hover {
  border-color: var(--border-dim);
  background: rgba(255,255,255,0.02);
  transform: translateX(3px);
}
.rank-item .idx {
  width: 26px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--text-muted);
  text-align: center;
}
.rank-item:nth-child(1) .idx { color: var(--neon-amber); text-shadow: var(--glow-amber); }
.rank-item:nth-child(2) .idx { color: var(--neon-cyan); text-shadow: var(--glow-cyan-sm); }
.rank-item:nth-child(3) .idx { color: var(--neon-magenta); text-shadow: var(--glow-magenta-sm); }
.rank-item .thumb {
  width: 68px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--border-dim);
  flex-shrink: 0;
}
.rank-item .rank-info { flex: 1; min-width: 0; }
.rank-item .rank-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.rank-item .rank-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.rank-item .rank-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan-sm);
  white-space: nowrap;
}

/* Deal banner */
.deal-banner {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.deal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  aspect-ratio: 16/8;
  cursor: pointer;
}
.deal-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.1);
  transition: transform 0.6s ease;
}
.deal-hero:hover img { transform: scale(1.05); }
.deal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6,6,20,0.9) 0%, transparent 60%);
}
.deal-hero .content {
  position: absolute;
  left: 24px; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.deal-hero .kicker {
  font-family: var(--font-mono);
  color: var(--neon-magenta);
  font-size: 11px;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-shadow: var(--glow-magenta-sm);
}
.deal-hero h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(0,229,255,0.4);
}
.deal-hero .timer {
  display: inline-flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.deal-hero .timer b {
  color: var(--text-primary);
  padding: 3px 8px;
  border: 1px solid var(--neon-cyan);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  box-shadow: var(--glow-cyan-sm);
  font-size: 12px;
}

.deal-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.deal-mini {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.deal-mini:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
}
.deal-mini img {
  width: 100px;
  aspect-ratio: 16/9;
  object-fit: cover;
  flex-shrink: 0;
}
.deal-mini .info { flex: 1; min-width: 0; }
.deal-mini h4 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-mini .p-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive */
@media (max-width: 1200px) {
  .cat-tiles, .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .games-grid.four-col { grid-template-columns: repeat(3, 1fr); }
  .games-grid.five-col { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .cat-tiles, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .ranking-wrap { grid-template-columns: 1fr; }
  .deal-banner { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .hero-content { left: 24px; bottom: 24px; }
}
@media (max-width: 600px) {
  .cat-tiles, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .games-grid, .games-grid.four-col, .games-grid.five-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-carousel { min-height: 320px; }
  .hero-title { font-size: 24px; }
}
