/* KillTime Games - light theme, clean, mobile-first */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --text: #1a1d2b;
  --text-2: #5a6072;
  --brand: #5b5bd6;
  --brand-2: #8b5cf6;
  --accent: #f59e0b;
  --border: #e3e6ef;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 24, 60, 0.06), 0 4px 16px rgba(20, 24, 60, 0.06);
  --shadow-lg: 0 8px 32px rgba(20, 24, 60, 0.12);
}

* { 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;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .logo-badge {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.logo:hover { text-decoration: none; }

.header-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.header-nav a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.header-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  text-align: center;
  padding: 52px 20px 40px;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(91, 91, 214, 0.10), transparent),
    radial-gradient(600px 220px at 80% 10%, rgba(245, 158, 11, 0.10), transparent);
}
.hero h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; }
.hero h1 span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* Search + Filter */
.controls {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 4px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 220px;
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  padding: 8px 0;
  color: var(--text);
}
.search-box button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chips button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chips button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-chips button:hover { border-color: var(--brand); color: var(--brand); }
.filter-chips button.active:hover { color: #fff; }

/* Game grid */
.grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.game-card a.game-link:hover { text-decoration: none; }
.thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--surface-2), #e4e7f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { font-size: 1.05rem; font-weight: 700; }
.card-body p { font-size: 0.85rem; color: var(--text-2); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 0.75rem; color: var(--text-2); flex-wrap: wrap; }
.card-meta .tag { background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-weight: 600; }

/* Game page */
.game-page { max-width: 920px; margin: 0 auto; padding: 24px 20px 60px; width: 100%; }
.breadcrumb { font-size: 0.85rem; color: var(--text-2); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-2); }
.game-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.game-title-row h1 { font-size: 1.7rem; font-weight: 800; }
.game-title-row .tag { background: var(--brand); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; font-weight: 700; }
.game-sub { color: var(--text-2); font-size: 0.9rem; margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.game-sub span::before { content: "· "; color: var(--border); }
.game-sub span:first-child::before { content: none; }

.game-frame-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 26px;
}
.game-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border: none;
  display: block;
  background: #000;
}
.frame-tip { padding: 10px 16px; font-size: 0.8rem; color: var(--text-2); background: var(--surface-2); border-top: 1px solid var(--border); }

.game-desc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 26px; }
.game-desc h2 { font-size: 1.1rem; margin-bottom: 8px; }
.game-desc p { color: var(--text-2); }

.similar h2 { font-size: 1.1rem; margin-bottom: 14px; }
.similar .grid { padding: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.85rem;
}
.site-footer .links { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); font-weight: 600; }
.site-footer a:hover { color: var(--brand); }

/* About page */
.static-page { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.static-page h1 { font-size: 1.8rem; margin-bottom: 16px; }
.static-page h2 { font-size: 1.2rem; margin: 24px 0 10px; }
.static-page p { color: var(--text-2); margin-bottom: 12px; }
.static-page ul { color: var(--text-2); padding-left: 22px; margin-bottom: 12px; }
.static-page li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.7rem; }
  .game-frame { aspect-ratio: 3/4; }
}

/* FAQ section */
.faq { max-width: 860px; margin: 36px auto 0; padding: 0 20px; }
.faq h2 { font-size: 1.2rem; margin-bottom: 14px; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 0.95rem; list-style: none; position: relative; padding-right: 40px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--brand); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 18px 14px; color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }

/* Ad slot placeholder (renders nothing until AdSense ID is set) */
.ad-slot { max-width: 860px; margin: 24px auto 0; padding: 0 20px; min-height: 90px; display: flex; align-items: center; justify-content: center; }
