/* ===================================================
   Game Hub — Global Stylesheet
   =================================================== */

/* --- Custom Properties --- */
:root {
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1a202c;
  --color-text-muted: #718096;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-badge-bg: #f59e0b;
  --color-badge-text: #ffffff;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 32px rgba(0, 0, 0, 0.10);
  --radius: 12px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: 0.18s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.site-tagline {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* --- Main --- */
main {
  flex: 1;
  padding: 2.5rem 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

/* --- Game Grid --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* --- Game Card --- */
.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.game-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.game-card-body {
  padding: 1rem;
  flex: 1;
}

.game-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.game-card-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* --- Badge --- */
.badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* --- Back Button --- */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.back-button:hover {
  background: #eef2ff;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* --- Under Construction Page --- */
.construction-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  flex: 1;
}

.construction-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem;
  line-height: 1;
}

.construction-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.construction-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 360px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .site-title {
    font-size: 1.4rem;
  }

  .game-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }

  .construction-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}
