
/* ========== Base ========= */
:root {
  --bg: #ffffff;
  --text: #1f2937; /* slate-800 */
  --muted: #6b7280; /* gray-500 */
  --card: #f8fafc;  /* slate-50 */
  --border: #e5e7eb; /* gray-200 */
  --accent: #007bff;
  --shadow: 0 10px 25px rgba(0,0,0,0.05);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ========== Header ========= */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo { height: 36px; }

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}

.nav a:hover { background: var(--card); }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: transform .15s ease;
}
.theme-toggle:active { transform: scale(.96); }

/* ========== Hero ========= */
.hero {
  background: #ffffff;
  padding: 64px 0;
}

.hero-inner {
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 10px 0;
}

.hero p {
  color: var(--muted);
  margin: 0 0 22px 0;
}

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

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,123,255,0.25); }
.btn:active { transform: translateY(0); opacity: .9; }

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.ghost:hover { background: rgba(0,123,255,0.06); box-shadow: none; }

/* ========== Sections ========= */
.features { padding: 36px 0 64px; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ========== Games ========= */
.page-title { margin: 28px 0 10px; }
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 18px 0 32px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.game-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.game-body {
  padding: 14px 16px 18px;
  display: grid;
  gap: 10px;
}

/* Note box */
.note {
  background: #f6f8fb;
  border: 1px dashed var(--border);
  padding: 12px 14px;
  border-radius: 12px;
  color: #475569;
}

/* ========== Footer ========= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: 32px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

/* ========== Dark Theme ========= */
body.dark {
  --bg: #0b1020;
  --text: #e6e8ef;
  --muted: #9aa3b2;
  --card: #101530;
  --border: #1c2340;
  --accent: #66b2ff;
}
.note { background: #0f1430; color: #cbd5e1; }

/* ========== Responsiveness ========= */
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 10px; }
}


/* ===== Root & Variables ===== */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
}

[data-theme="dark"] {
  --text-dark: #f9fafb;
  --text-light: #d1d5db;
  --bg-light: #1f2937;
  --bg-white: #111827;
  --border-color: #374151;
}

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== Header & Navigation ===== */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
}

.brand img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: var(--spacing-xl);
  align-items: center;
}

.nav a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* ===== Main Content ===== */
main {
  padding: var(--spacing-2xl) 0;
  min-height: calc(100vh - 200px);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-2xl);
  color: var(--text-dark);
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

/* ===== Game Card ===== */
.game-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.game-body {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

.game-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid;
  cursor: pointer;
  text-align: center;
}

.btn.ghost {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn.ghost:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-2px);
}

/* ===== Note Box ===== */
.note {
  background-color: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: var(--spacing-lg);
  border-radius: 8px;
  margin: var(--spacing-2xl) 0;
}

.note p {
  color: var(--text-dark);
  margin: 0;
}

.note code {
  background-color: var(--bg-white);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-2xl);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-xl) 0;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.site-footer p {
  margin: 0;
  color: var(--text-light);
}

.site-footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--primary-dark);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
  }

  .nav {
    gap: var(--spacing-lg);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .page-title {
    font-size: 1.75rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: var(--spacing-md);
    font-size: 0.9rem;
  }

  .header-inner {
    padding: var(--spacing-sm) 0;
  }

  .game-body {
    padding: var(--spacing-md);
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
  body {
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --bg-light: #1f2937;
    --bg-white: #111827;
    --border-color: #374151;
  }
}