/* === Game Discovery Site === */
/* Dark editorial aesthetic with coral accents */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #181822;
  --bg-hover: #20202c;
  --border: #272736;
  --border-light: #3a3a4e;
  --text: #ececf1;
  --text-dim: #8e8ea0;
  --text-muted: #56566f;
  --accent: #ff5e3a;
  --accent-soft: rgba(255, 94, 58, 0.12);
  --accent-glow: rgba(255, 94, 58, 0.4);
  --secondary: #00d4aa;
  --secondary-soft: rgba(0, 212, 170, 0.12);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, h2, h3, .display {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === Layout === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-8) 0;
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Anton', sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* === Hero === */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.hero-label {
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.hero h1 {
  margin-bottom: var(--space-4);
  max-width: 700px;
}

.hero p {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 540px;
  margin-bottom: var(--space-5);
}

.hero-stats {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat .num {
  font-family: 'Anton', sans-serif;
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
}

.hero-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-1);
}

/* === Cards === */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.game-card .cover {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.game-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.game-card .cover .score {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
}

.game-card .cover .score.high { color: var(--secondary); }
.game-card .cover .score.mid { color: #f5a623; }
.game-card .cover .score.low { color: var(--accent); }

.game-card .info {
  padding: var(--space-4);
}

.game-card .info h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: var(--space-2);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card .meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-card .meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.game-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.tag.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(255, 94, 58, 0.25);
}

/* === Section Headers === */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-6);
}

.section-header h2 {
  margin-bottom: var(--space-2);
}

.section-header p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.section-header .view-all {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-header .view-all:hover {
  text-decoration: underline;
}

/* === Genre Cloud === */
.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.genre-pill {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.genre-pill:hover {
  background: var(--accent-soft);
  border-color: rgba(255, 94, 58, 0.3);
  color: var(--accent);
  transform: translateY(-2px);
}

/* === Detail Page === */
.detail-hero {
  position: relative;
  padding: var(--space-8) 0;
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.3) 0%, var(--bg) 100%);
  z-index: 1;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: blur(40px) saturate(1.2);
}

.detail-hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  aspect-ratio: 3/4;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin-bottom: var(--space-3);
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.detail-meta-item .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-meta-item .value {
  font-size: 0.95rem;
  color: var(--text-dim);
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0;
}

.rating-badge {
  background: var(--accent-soft);
  border: 1px solid rgba(255, 94, 58, 0.25);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  text-align: center;
}

.rating-badge .num {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.rating-badge .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.detail-desc {
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 640px;
}

.detail-desc p + p {
  margin-top: var(--space-4);
}

/* === Screenshots === */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.screenshot-grid img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-elevated);
}

/* === Lists === */
.platform-list,
.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.platform-list .pill,
.genre-list .pill {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
  margin-top: var(--space-8);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer .disclaimer {
  margin-top: var(--space-2);
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* === News === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: border-color 0.2s, transform 0.2s;
}

.news-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.news-card h4 {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-2);
  text-transform: none;
  letter-spacing: 0;
}

.news-card h4 a {
  color: var(--text);
  text-decoration: none;
}

.news-card h4 a:hover {
  color: var(--accent);
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.news-card-meta .source {
  color: var(--accent);
  font-weight: 500;
}

.news-card-meta .news-game {
  color: var(--secondary);
  font-weight: 500;
}

.news-card-meta .date {
  color: var(--text-muted);
}

/* News list (detail page) */
.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 800px;
}

.news-item {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

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

.news-item h4 {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
  text-transform: none;
  letter-spacing: 0;
}

.news-item h4 a {
  color: var(--text);
  text-decoration: none;
}

.news-item h4 a:hover {
  color: var(--accent);
}

.news-item .news-meta {
  display: flex;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.news-item .news-meta .source {
  color: var(--accent);
}

.news-item p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}


/* === Mobile Bottom Navigation === */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 99;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav .nav-items {
  display: flex;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  justify-content: space-around;
  align-items: stretch;
}

.mobile-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  min-height: 44px;
}

.mobile-bottom-nav .nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-bottom-nav .nav-item.active {
  color: var(--accent);
}

.mobile-bottom-nav .nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}

.mobile-bottom-nav .nav-item:active {
  color: var(--text);
}


/* === Responsive Design === */

/* Tablet and below */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-4);
  }

  .hero {
    padding: var(--space-8) 0 var(--space-7);
  }

  .detail-hero .container {
    grid-template-columns: 240px 1fr;
    gap: var(--space-5);
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --space-8: 48px;
    --space-9: 64px;
  }

  body {
    font-size: 14px;
  }

  .container {
    padding: 0 var(--space-3);
  }

  /* Header */
  .site-header .container {
    height: 56px;
  }

  .logo {
    font-size: 1.25rem;
  }

  /* Show bottom nav on mobile */
  .mobile-bottom-nav {
    display: block;
  }

  /* Add space for bottom nav - use margin on footer instead of body padding */
  .site-footer {
    margin-bottom: 60px;
  }

  .nav-links {
    display: none !important;
  }

  /* Hero */
  .hero {
    padding: var(--space-7) 0 var(--space-6);
  }

  .hero::before {
    width: 400px;
    height: 400px;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-4);
    flex-wrap: wrap;
  }

  .hero-stat .num {
    font-size: 2rem;
  }

  /* Sections */
  .section {
    padding: var(--space-7) 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
  }

  /* Game grid - 2 columns on mobile */
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .game-card .info {
    padding: var(--space-3);
  }

  .game-card .info h3 {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    white-space: normal;
    overflow: hidden;
  }

  .game-card .meta {
    font-size: 0.7rem;
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 2.4em;
  }

  .game-card .meta span:nth-child(3) {
    display: none;
  }

  .game-card .tags {
    margin-top: var(--space-2);
  }

  .tag {
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .game-card .cover .score {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  /* Genre cloud */
  .genre-cloud {
    gap: var(--space-2);
  }

  .genre-pill {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8rem;
  }

  /* Detail page */
  .detail-hero {
    padding: var(--space-6) 0;
  }

  .detail-hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .detail-poster {
    max-width: 180px;
    margin: 0 auto;
  }

  .detail-info h1 {
    font-size: 2rem;
    text-align: center;
  }

  .detail-meta-row {
    justify-content: center;
    gap: var(--space-3);
  }

  .detail-meta-item .label {
    font-size: 0.65rem;
  }

  .detail-meta-item .value {
    font-size: 0.85rem;
  }

  .detail-rating {
    justify-content: center;
    margin: var(--space-4) 0;
  }

  .detail-desc {
    max-width: 100%;
    font-size: 0.9rem;
  }

  .genre-list,
  .platform-list {
    justify-content: center;
  }

  /* Screenshots */
  .screenshot-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  /* Breadcrumb */
  .breadcrumb {
    margin-bottom: var(--space-4);
    font-size: 0.75rem;
  }

  /* News */
  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .news-card {
    padding: var(--space-3);
  }

  .news-card h4 {
    font-size: 0.9rem;
  }

  /* Footer */
  .site-footer .container {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  .site-footer p {
    font-size: 0.75rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --space-7: 32px;
    --space-8: 40px;
  }

  .container {
    padding: 0 var(--space-2);
  }

  .logo {
    font-size: 1.1rem;
  }

  /* Hero */
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-stat .num {
    font-size: 1.5rem;
  }

  .hero-stat .label {
    font-size: 0.65rem;
  }

  /* Game grid - still 2 columns for cards, but tighter */
  .game-grid {
    gap: var(--space-2);
  }

  .game-card .info {
    padding: var(--space-2);
  }

  .game-card .info h3 {
    font-size: 0.75rem;
  }

  .game-card .meta {
    font-size: 0.65rem;
  }

  /* Detail page */
  .detail-info h1 {
    font-size: 1.5rem;
  }

  .detail-poster {
    max-width: 140px;
  }

  .rating-badge .num {
    font-size: 1.5rem;
  }

  .rating-badge {
    padding: var(--space-2) var(--space-3);
  }

  /* Genre pills */
  .genre-pill {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
  }

  /* Section headers */
  .section-header h2 {
    font-size: 1.4rem;
  }

  .section-header p {
    font-size: 0.8rem;
  }
}

/* Landscape phone */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-bottom-nav {
    height: 50px;
  }

  .site-footer {
    margin-bottom: 50px;
  }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
  .game-card:hover {
    transform: none;
  }

  .game-card:hover .cover img {
    transform: none;
  }

  .genre-pill:hover {
    transform: none;
  }

  /* Larger touch targets */
  .nav-links a,
  .genre-pill,
  .game-card,
  .mobile-bottom-nav .nav-item {
    -webkit-tap-highlight-color: rgba(255, 94, 58, 0.15);
  }

  .genre-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .view-all {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
