@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --color-bg: #f9f9f9;
  --color-text: #111111;
  --color-text-light: #555555;
  --color-accent: #d8613c;
  --color-border: #e0e0e0;
  --color-card-bg: #ffffff;
  --color-footer-bg: #111111;
  --color-footer-text: #f9f9f9;
  --color-link: #d8613c;
  --color-link-hover: #b5461f;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 960px;
  --nav-height: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header & Navigation */
header {
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo:hover {
  color: var(--color-text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

nav ul a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

nav ul a:hover {
  color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

/* Main content */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

/* Page titles */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* Hero section (homepage) */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Game showcase sections */
.game-section {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.game-section h2 {
  font-size: 1.75rem;
  margin-top: 0;
}

.game-section .feature-img {
  border-radius: 12px;
  margin: 1.5rem 0;
}

.game-section .screenshots {
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Store badges */
.store-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.store-badges a img {
  height: 48px;
  width: auto;
}

/* Social links */
.social-links {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.social-links a {
  color: var(--color-text);
  font-weight: 500;
}

/* Team cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.team-card {
  text-align: center;
}

.team-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.team-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.team-card a {
  color: var(--color-text);
}

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

.team-card .role {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Blog listing */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  padding: 1.5rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.blog-card h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.blog-card h2 a {
  color: var(--color-text);
}

.blog-card h2 a:hover {
  color: var(--color-accent);
}

.blog-card .post-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.blog-card .post-meta span::before {
  content: " · ";
}

.blog-card .post-meta span:first-child::before {
  content: "";
}

.blog-card .excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Blog post */
.blog-post .post-meta {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.blog-post .post-meta span::before {
  content: " · ";
}

.blog-post .post-meta span:first-child::before {
  content: "";
}

.blog-post .post-content {
  line-height: 1.8;
}

.blog-post .post-content h2 {
  margin-top: 2.5rem;
}

.blog-post .post-content h3 {
  margin-top: 2rem;
}

.blog-post .post-content ul,
.blog-post .post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-post .post-content li {
  margin-bottom: 0.5rem;
}

.blog-post .post-content img {
  border-radius: 8px;
  margin: 1.5rem 0;
}

.blog-post .post-content figure {
  margin: 2rem 0;
}

.blog-post .post-content figure img {
  max-width: 100%;
  height: auto;
}

.blog-post .post-content figcaption {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Code blocks */
pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.25rem 0;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
}

p code,
li code {
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Post navigation (prev/next) */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  gap: 1rem;
}

.post-navigation a {
  font-weight: 500;
}

.post-navigation .next {
  margin-left: auto;
  text-align: right;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.pagination a {
  font-weight: 500;
}

/* Featured image */
.featured-image {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
}

.featured-image figcaption {
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-align: center;
  padding: 0.5rem 0;
  font-style: italic;
}

/* Support page */
.contact-section {
  text-align: center;
  padding: 2rem 0;
}

.contact-section a {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Legal pages */
.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

.legal-content p {
  font-size: 0.95rem;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.legal-content li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Credits page */
.credits-list {
  padding-left: 1.5rem;
}

.credits-list li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
  margin-top: auto;
}

footer a {
  color: var(--color-footer-text);
  text-decoration: underline;
}

/* Legal footer links */
.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  margin: 0 0.5rem;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-card-bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  nav ul.open {
    display: flex;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .post-navigation {
    flex-direction: column;
  }

  .post-navigation .next {
    text-align: left;
  }
}
