/* =========================
   GLOBAL RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   HEADER / NAV
========================= */
header {
  background: #020617;
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
}

header > *,
main,
footer {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

header h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav a {
  font-size: 14px;
  opacity: 0.9;
}

nav a:hover {
  opacity: 1;
}

/* =========================
   MAIN LAYOUT
========================= */
main {
  padding: 14px;
  max-width: 1000px;
  margin: 20px auto 0;
}

section {
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

p {
  margin: 0 0 10px;
  color: #cbd5f5;
}

main > section {
  background: #0b1220;
  padding: 10px;
  border-radius: 10px;
}

/* =========================
   GAME LIST (index.html, latest, trending, category)
========================= */
article {
  background: #1e293b;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

article h3 {
  font-size: 15px;
  margin-bottom: 2px;
}

article p {
  font-size: 12px;
  margin-bottom: 4px;
}

/* =========================
   GAME GRID (optional use)
========================= */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* =========================
   CODES LIST (game.html)
========================= */
.codes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code {
  background: #1e293b;
  padding: 14px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code strong {
  color: #38bdf8;
  font-size: 15px;
}

.code span {
  font-size: 13px;
  color: #cbd5f5;
}

/* Buttons (Copy) */
.code button {
  background: #38bdf8;
  border: none;
  color: #020617;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.code button:hover {
  background: #0ea5e9;
}

/* Expired codes */
.expired .code,
.code.expired {
  opacity: 0.45;
}

.expired button {
  display: none;
}

/* =========================
   FORMS (search.html only)
========================= */
form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"],
select {
  background: #020617;
  border: 1px solid #334155;
  color: #e5e7eb;
  padding: 10px;
  border-radius: 6px;
  min-width: 220px;
}

button[type="submit"] {
  background: #38bdf8;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  color: #020617;
}

/* =========================
   LISTS (faq, game-info)
========================= */
ul, ol {
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

/* =========================
   FOOTER
========================= */
footer {
  border-top: 1px solid #1e293b;
  padding: 12px 16px;
  font-size: 13px;
  color: #94a3b8;
  background: #020617;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
  article {
    padding: 8px;
  }

  article h3 {
    font-size: 14px;
  }

  article p {
    font-size: 12px;
  }

  article a {
    font-size: 12px;
  }
}