@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:ital,wght@0,300;0,400;0,700;1,400&display=swap');

/* ── VARIABLES ───────────────────────────── */
:root {
  --bg3-accent:    #c9960c;
  --ee-accent:     #7c3aed;
  --text-primary:  #f0ede6;
  --text-muted:    #a0a0b0;
  --card-bg:       rgba(10, 10, 20, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.1);
}

/* ── LANGUAGE DISPLAY ────────────────────── */
/* Default: English visible, Japanese & Portuguese hidden */
.lang-ja { display: none; }
.lang-pt { display: none; }

[data-lang="ja"] .lang-en { display: none; }
[data-lang="ja"] .lang-ja { display: revert; }

[data-lang="pt"] .lang-en { display: none; }
[data-lang="pt"] .lang-pt { display: revert; }


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

body {
  font-family: 'Lato', Arial, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
}

/* Overlay layer — only used by bg3-page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body > * { position: relative; z-index: 1; }

/* Landing: clean dark gradient, no game imagery */
body.landing {
  background: radial-gradient(ellipse 140% 100% at 25% 55%, #14143a 0%, #08080f 65%);
}

/* BG3: keep the atmospheric background */
body.bg3-page {
  background: url('mainbg.jpg') no-repeat center center fixed;
  background-size: cover;
}
body.bg3-page::before {
  background: rgba(5, 5, 15, 0.72);
}

/* EE: game background with dark overlay */
body.ee-page {
  background: url('ee-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}
body.ee-page::before {
  background: rgba(5, 2, 15, 0.75);
}

/* ── HEADER ─────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(5, 5, 15, 0.92);
  backdrop-filter: blur(10px);
}

.site-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.site-header .tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ── LANGUAGE TOGGLE ─────────────────────── */
.lang-toggle {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.05em;
  transition: background 0.2s, border-color 0.2s;
}
.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ── LANGUAGE SWITCHER (3-lang pages) ──── */
.lang-switcher {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.35rem;
}
.lang-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.05em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lang-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}
.lang-btn.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  font-weight: 700;
}

/* ── DISCLAIMER BAR ─────────────────────── */
.disclaimer-bar {
  background: rgba(220, 150, 0, 0.12);
  border-bottom: 1px solid rgba(220, 150, 0, 0.3);
  padding: 0.65rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: #f0c060;
  line-height: 1.6;
}

/* ── LANDING: GAME SELECTOR ─────────────── */
.landing-main {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2.5rem;
  padding: 5rem 2rem;
  flex-wrap: wrap;
  min-height: calc(100vh - 185px);
}

.game-card {
  display: flex;
  flex-direction: column;
  width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-card:hover { transform: translateY(-6px); }

.game-card.bg3-card:hover {
  border-color: var(--bg3-accent);
  box-shadow: 0 16px 48px rgba(201, 150, 12, 0.3);
}
.game-card.ee-card:hover {
  border-color: var(--ee-accent);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.3);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
}

.card-image-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(60, 20, 120, 0.6), rgba(10, 5, 30, 0.9));
  color: rgba(200, 180, 255, 0.85);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.card-body h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.card-unofficial {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.bg3-card .card-body h2  { color: var(--bg3-accent); }
.ee-card  .card-body h2  { color: #a78bfa; }

.card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.card-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  align-self: flex-start;
}

.badge-stopped {
  background: rgba(180, 50, 50, 0.25);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.badge-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

/* ── INNER PAGES ─────────────────────────── */
.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--text-primary); }

.page-banner {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
}
.page-banner img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
  padding: 2rem;
}

.page-banner-placeholder {
  padding: 4rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(60, 20, 120, 0.5), rgba(10, 5, 30, 0.95));
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: rgba(200, 180, 255, 0.9);
  letter-spacing: 0.1em;
}

.page-unofficial-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #f0c060;
  background: rgba(220, 150, 0, 0.12);
  border: 1px solid rgba(220, 150, 0, 0.3);
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 0.5rem;
}

.page-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}
.bg3-page .page-title { color: var(--bg3-accent); }
.ee-page  .page-title { color: #a78bfa; }

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.content-section {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
}

.content-section h2 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.bg3-page .content-section h2 {
  border-bottom: 2px solid var(--bg3-accent);
  color: var(--bg3-accent);
}
.ee-page .content-section h2 {
  border-bottom: 2px solid var(--ee-accent);
  color: #a78bfa;
}

.content-section p {
  line-height: 1.85;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.content-section p + p { margin-top: 0.75rem; }

.content-section a {
  color: #7fb3f0;
  text-decoration: none;
}
.content-section a:hover { text-decoration: underline; }

.date-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── FOOTER ──────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(5, 5, 15, 0.55);
  line-height: 1.7;
}

/* ── DOWNLOAD & INSTALL ─────────────────── */
.download-btn {
  display: inline-block;
  background: var(--ee-accent);
  color: #fff;
  padding: 0.65rem 1.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.2s, box-shadow 0.2s;
}
.download-btn:hover {
  background: #6d28d9;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  text-decoration: none;
}

.install-steps {
  padding-left: 1.4rem;
  margin: 0;
}
.install-steps li {
  padding: 0.35rem 0;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ── SCREENSHOT GALLERY ─────────────────── */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.screenshot-item {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: zoom-in;
}
.screenshot-item:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}
.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── PROGRESS LIST ──────────────────────── */
.progress-list {
  list-style: none;
  padding: 0;
}
.progress-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-primary);
}
.progress-list li:last-child { border-bottom: none; }

/* ── LIGHTBOX ───────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; background: rgba(255, 255, 255, 0.15); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ── CODE INLINE ────────────────────────── */
.content-section code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.88em;
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 720px) {
  .site-header h1   { font-size: 1.5rem; }
  .lang-toggle      { top: 0.75rem; right: 0.75rem; font-size: 0.72rem; padding: 0.28rem 0.7rem; }
  .lang-switcher    { top: 0.75rem; right: 0.75rem; }
  .lang-btn         { font-size: 0.68rem; padding: 0.25rem 0.55rem; }
  .landing-main     { padding: 3rem 1rem; gap: 1.5rem; }
  .game-card        { width: 100%; max-width: 400px; }
  .page-wrapper     { padding: 1.5rem 1rem 3rem; }
  .page-title       { font-size: 1.4rem; }
  .content-section  { padding: 1.25rem; }
  .screenshot-gallery { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .lightbox-prev, .lightbox-next { width: 36px; height: 36px; font-size: 1.4rem; }
}
