html { color-scheme: light; }

/*
FILE: subsites/common/common.css
Purpose: Common styles for all subsites (landing, games)
*/

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background: #fafafa;
}

a {
  color: #4a6fa5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 50px;
}

.brand-icon-dark { display: none; }
html[data-theme="dark"] .brand-icon-light { display: none; }
html[data-theme="dark"] .brand-icon-dark { display: inline; }

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.logo h1 a {
  color: #1a1a2e;
  text-decoration: none;
}

.logo h1 a:hover {
  text-decoration: none;
}

.tagline {
  font-size: 0.85rem;
  color: #666;
  margin-left: 8px;
}

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

.header-right select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
}

.app-link {
  font-weight: 600;
  color: #4a6fa5;
}

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 40px 20px;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: white;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 16px;
  color: white;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  margin: 0 12px;
}

.footer-copyright {
  font-size: 0.8rem;
  margin-top: 24px;
  opacity: 0.6;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #4a6fa5;
  color: white;
}

.btn-primary:hover {
  background: #3a5a8a;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: #4a6fa5;
  border: 1px solid #4a6fa5;
}

.btn-secondary:hover {
  background: #f0f4f9;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-large {
  padding: 14px 40px;
  font-size: 1.1rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: #666; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 8px;
  border: 1px solid #d8dee5;
  border-radius: 50%;
  background: transparent;
  color: #354351;
  cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.theme-toggle:hover { background: #eef3f7; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { color: #e8edf1; background: #151a20; }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .info-toc,
html[data-theme="dark"] .info-section,
html[data-theme="dark"] .game-demo-card,
html[data-theme="dark"] .direct-game-section,
html[data-theme="dark"] .space-summary,
html[data-theme="dark"] details,
html[data-theme="dark"] .empty { color: #e8edf1; background: #202831; border-color: #3a4651; }
html[data-theme="dark"] .site-header { border-bottom-color: #34404a; }
html[data-theme="dark"] .logo h1 a,
html[data-theme="dark"] .news-hero h1,
html[data-theme="dark"] .info-hero h2,
html[data-theme="dark"] .game-demo-card h3,
html[data-theme="dark"] .info-section h3,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: #edf2f6; }
html[data-theme="dark"] .tagline,
html[data-theme="dark"] .info-section p,
html[data-theme="dark"] .info-section li,
html[data-theme="dark"] .news-card p,
html[data-theme="dark"] .description,
html[data-theme="dark"] .meta,
html[data-theme="dark"] .direct-game-section p { color: #c0cbd4; }
html[data-theme="dark"] .info-hero,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .news-page { background: #171e25; }
html[data-theme="dark"] .hero .subtitle,
html[data-theme="dark"] .eyebrow { color: #becbd5; }
html[data-theme="dark"] .news-card { background: #202831; border-left-color: #d28b62; }
html[data-theme="dark"] input,
html[data-theme="dark"] select { color: #e8edf1; background: #151a20; border-color: #53616d; }
html[data-theme="dark"] .theme-toggle { color: #e8edf1; border-color: #53616d; }
html[data-theme="dark"] .theme-toggle:hover { background: #303b46; }
html[data-theme="dark"] .site-footer { background: #10151a; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle { color: #e8edf1; border-color: #53616d; }
}
