/* ============================================================
   Shaste Games — RETRO GAMING PORTAL
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --bg: #0c0e14;
  --panel: #151821;
  --border: #2a2e3d;
  --text: #c8cad0;
  --dim: #5a5e6e;
  --pink: #ff2d78;
  --blue: #00d4ff;
  --green: #39ff14;
  --purple: #b44dff;
  --yellow: #ffe14d;
  --cyan: #00e5c7;
  --orange: #ff9500;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-pixel: 'Press Start 2P', monospace;
  --topbar-h: 48px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255, 45, 120, 0.3); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* ── COLOR CLASSES ── */
.clr-pink { color: var(--pink); }
.clr-blue { color: var(--blue); }
.clr-green { color: var(--green); }
.clr-purple { color: var(--purple); }
.clr-yellow { color: var(--yellow); }
.clr-cyan { color: var(--cyan); }
.clr-orange { color: var(--orange); }
.clr-dim { color: var(--dim); }
.dim { color: var(--dim); }
.green { color: var(--green); }
.hidden { display: none !important; }

/* ── ARRIVAL NOTICE ── */
.arrival-notice {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(12, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.arrival-notice-card {
  position: relative;
  width: min(680px, 100%);
  background: linear-gradient(160deg, rgba(21, 24, 33, 0.96), rgba(17, 20, 30, 0.96));
  border: 1px solid rgba(255, 45, 120, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border-radius: 14px;
  padding: clamp(20px, 3vw, 34px);
}
.arrival-notice-controls {
  position: absolute;
  top: 14px;
  right: 14px;
}
.arrival-lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f2f7;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.arrival-lang-button:hover,
.arrival-lang-button:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}
.arrival-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(220px, 72vw);
  max-height: 320px;
  overflow: auto;
  border-radius: 14px;
  padding: 8px;
  background: rgba(12, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}
.arrival-lang-option {
  width: 100%;
  border: none;
  background: transparent;
  color: #f1f2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.arrival-lang-option:hover,
.arrival-lang-option:focus-visible,
.arrival-lang-option.active {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.arrival-lang-option .lang-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.arrival-notice-tag {
  color: var(--pink);
  letter-spacing: 2px;
  font-size: 10px;
  margin-bottom: 12px;
}
.arrival-notice h2 {
  color: #f3f4f8;
  font-size: clamp(20px, 3.5vw, 28px);
  line-height: 1.35;
  margin-bottom: 14px;
}
.arrival-notice p {
  color: #d1d4df;
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.8;
}
.arrival-notice p + p {
  margin-top: 12px;
}
.arrival-notice a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.45);
  text-underline-offset: 3px;
}
.arrival-notice a:hover {
  color: #7decff;
}

/* ── TOPBAR ── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.logo {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--pink);
  text-decoration: none;
  white-space: nowrap;
}
.logo-sub {
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}
.topbar-nav {
  display: flex;
  gap: 20px;
}
.nav-link {
  color: var(--dim);
  font-size: 12px;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--blue); }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-patron {
  padding: 6px 16px;
  border: 1px solid var(--pink);
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-patron:hover {
  background: var(--pink);
  color: #fff;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(12, 14, 20, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}
.mobile-menu.open { display: flex; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 320px;
}
.mobile-link {
  font-size: 16px;
  color: var(--dim);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-link:hover, .mobile-link:active { color: var(--blue); }
.mobile-link.patron-link {
  color: var(--pink);
  border-color: var(--pink);
  margin-top: 12px;
  text-align: center;
}

/* ── LAYOUT ── */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
}

/* ── SIDEBARS ── */
.sidebar-left, .sidebar-right {
  border-color: var(--border);
  padding: 16px;
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
  position: sticky;
  top: var(--topbar-h);
}
.sidebar-left { border-right: 1px solid var(--border); }
.sidebar-right { border-left: 1px solid var(--border); }
.sidebar-section { margin-bottom: 20px; }
.sidebar-label {
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.sidebar-label.green { color: var(--green); }
.sidebar-label.blue { color: var(--blue); }
.sidebar-label.pink { color: var(--pink); }
.sidebar-label.purple { color: var(--purple); }
.sidebar-label.cyan { color: var(--cyan); }
.sidebar-label.yellow { color: var(--yellow); }

/* ── MAIN CONTENT ── */
.main-content {
  padding: 16px;
  overflow-y: auto;
}

/* ── PANELS ── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.panel.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── GAME CARDS (sidebar) ── */
.game-card {
  padding: 12px;
  margin-bottom: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.game-card:hover { background: rgba(0, 212, 255, 0.04); }
.game-card.selected {
  background: rgba(255, 45, 120, 0.08);
  border-color: rgba(255, 45, 120, 0.25);
}
.game-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.game-card-title {
  font-size: 12px;
  font-weight: 500;
  transition: color 0.2s;
}
.game-card-status { font-size: 10px; }
.game-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
}

/* ── PROGRESS BAR ── */
.progress-bar {
  margin-top: 6px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar.large { height: 6px; border-radius: 3px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width 0.5s ease;
  border-radius: inherit;
}

/* ── SIDEBAR CARDS ── */
.sidebar-card {
  padding: 12px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.sidebar-card:hover { border-color: rgba(0, 212, 255, 0.25); }
.sidebar-card-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.sidebar-card-meta {
  font-size: 10px;
  color: var(--dim);
  margin-top: 2px;
}

/* ── HERO ── */
.hero-panel { position: relative; }
.terminal-prompt {
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 3.5vw, 20px);
  color: var(--pink);
  line-height: 1.6;
  margin-bottom: 16px;
}
.hero-desc {
  color: var(--dim);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 12px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.terminal-cursor { font-size: 11px; }
.blink { animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: transparent;
  white-space: nowrap;
}
.btn-pink { border-color: var(--pink); color: var(--pink); background: var(--pink); color: #fff; }
.btn-pink:hover { background: transparent; color: var(--pink); }
.btn-blue { border-color: var(--blue); color: var(--blue); }
.btn-blue:hover { background: var(--blue); color: #000; }
.btn-purple { border-color: var(--purple); color: var(--purple); }
.btn-purple:hover { background: var(--purple); color: #fff; }
.btn-green { border-color: var(--green); color: var(--green); }
.btn-green:hover { background: var(--green); color: #000; }
.btn-small { padding: 6px 14px; font-size: 10px; }
.btn-full { width: 100%; }

/* ── GAME DETAIL ── */
.game-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.detail-item { }
.detail-item.full { grid-column: 1 / -1; }
.detail-label {
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.detail-value { font-size: 13px; }
.detail-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.game-detail-note {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 45, 120, 0.04);
  border: 1px solid rgba(255, 45, 120, 0.12);
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
}

/* ── NOVELS ── */
.novels-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.novel-card {
  padding: 24px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.novel-card:hover { border-color: rgba(0, 212, 255, 0.3); }
.novel-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}
.novel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}
.novel-genre {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.novel-title { font-size: 16px; font-weight: 500; }
.novel-status { font-size: 10px; white-space: nowrap; }
.novel-desc { font-size: 12px; line-height: 1.7; margin-bottom: 12px; }
.novel-chapters {
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 12px;
}
.novel-platforms { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-tag {
  padding: 4px 10px;
  font-size: 10px;
  border: 1px solid var(--border);
  color: var(--dim);
  transition: all 0.2s;
}
.platform-tag:hover { border-color: var(--blue); color: var(--blue); }
.patron-tag {
  border-color: rgba(255, 45, 120, 0.3);
  color: var(--pink);
}
.patron-tag:hover { border-color: var(--pink); background: rgba(255, 45, 120, 0.08); }

/* ── WIKI ── */
.wiki-content { margin-top: 16px; line-height: 1.7; font-size: 12px; }
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.wiki-card {
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.wiki-card:hover { border-color: rgba(180, 77, 255, 0.3); transform: translateY(-2px); }
.wiki-card-icon { font-size: 24px; margin-bottom: 8px; }
.wiki-card-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.wiki-card-desc { font-size: 11px; line-height: 1.5; }

/* ── COMMUNITY ── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.community-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  align-items: flex-start;
}
.community-card:hover { border-color: rgba(0, 212, 255, 0.3); transform: translateY(-2px); }
.community-icon { font-size: 24px; flex-shrink: 0; }
.community-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.community-desc { font-size: 11px; line-height: 1.5; }

/* ── SUPPORT ── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.support-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  align-items: flex-start;
}
.support-card:hover { border-color: rgba(255, 229, 77, 0.3); transform: translateY(-2px); }
.support-card.primary {
  border-color: rgba(255, 45, 120, 0.3);
  background: rgba(255, 45, 120, 0.04);
}
.support-icon { font-size: 24px; flex-shrink: 0; }
.support-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.support-desc { font-size: 11px; line-height: 1.5; }
.support-region {
  font-size: 10px;
  color: var(--cyan);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* ── DEVLOG ── */
.devlog-entry {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-size: 12px;
}
.devlog-entry.bordered { border-bottom: 1px solid var(--border); }
.devlog-date { color: var(--dim); min-width: 45px; font-size: 11px; flex-shrink: 0; }

/* ── STATS (sidebar) ── */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stat-value { font-weight: 500; }

/* ── QUICK LINKS (sidebar) ── */
.quick-link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 2px;
  border: 1px solid transparent;
  font-size: 12px;
  transition: all 0.2s;
  text-decoration: none;
}
.quick-link:hover {
  background: rgba(0, 212, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.15);
}

/* ── XP BAR ── */
.xp-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.xp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  transition: width 1.5s ease-out;
  border-radius: 4px;
}
.xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
}

/* ── NEWSLETTER ── */
.newsletter-panel { }
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.newsletter-form input,
.sidebar-nl-form input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input:focus,
.sidebar-nl-form input:focus { border-color: var(--pink); }
.sidebar-nl-form { display: flex; flex-direction: column; gap: 8px; }
.sidebar-newsletter {
  background: rgba(255, 45, 120, 0.04);
  border: 1px solid rgba(255, 45, 120, 0.12);
  padding: 16px;
}
.newsletter-success {
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

/* ── FOOTER ── */
.footer-panel {
  text-align: center;
  background: transparent;
  border: none;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-link {
  font-size: 11px;
  color: var(--dim);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--blue); }
.footer-copy {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 8px;
}
.footer-legal { font-size: 10px; }
.footer-legal a {
  color: var(--dim);
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--text); }

/* ── MOBILE-ONLY ── */
.mobile-only { display: none; }

/* ── SEO CONTENT ── */
.seo-content { }
.seo-text {
  margin-top: 12px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.8;
}
.seo-text p { margin-bottom: 12px; }
.seo-text strong { color: var(--text); }

/* ── H2 RESETS (used as section labels) ── */
h2.sidebar-label {
  font-family: var(--font-mono);
  font-weight: 400;
  margin: 0 0 12px 0;
}

/* ============================================================
   RESPONSIVE — TABLET (< 1100px)
   ============================================================ */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar-left, .sidebar-right {
    display: none;
  }
  .mobile-only { display: block; }
  .main-content {
    padding: 12px;
  }
  .topbar-nav { display: none; }
  .hamburger { display: flex; }
  .logo-sub { display: none; }
  .hero-title { font-size: clamp(14px, 4vw, 20px); }
  .game-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .community-grid {
    grid-template-columns: 1fr;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .wiki-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 640px)
   ============================================================ */
@media (max-width: 640px) {
  :root { --topbar-h: 52px; }
  #topbar { padding: 0 16px; }
  .logo { font-size: 12px; }
  .btn-patron { display: none; }
  .main-content { padding: 8px; }
  .panel { padding: 16px; margin-bottom: 10px; }
  .hero-title { font-size: clamp(11px, 3.5vw, 16px); line-height: 1.8; }
  .hero-desc { font-size: 11px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .game-detail-grid { grid-template-columns: 1fr; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; text-align: center; }
  .novel-card-header { flex-direction: column; }
  .novel-platforms { flex-wrap: wrap; }
  .wiki-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-links { gap: 10px; }
  .mobile-link { font-size: 14px; padding: 10px 0; }
  .devlog-entry { flex-direction: column; gap: 4px; }
  .devlog-date { min-width: auto; }
}

/* ============================================================
   RESPONSIVE — WIDE DESKTOP (> 1400px)
   ============================================================ */
@media (max-width: 560px) {
  .arrival-notice-card {
    padding-top: 62px;
  }
  .arrival-notice-controls {
    top: 12px;
    right: 12px;
  }
  .arrival-lang-button {
    padding: 7px 10px;
    font-size: 11px;
  }
}

@media (min-width: 1400px) {
  .layout {
    grid-template-columns: 300px 1fr 320px;
  }
  .hero-title { font-size: 22px; }
  .game-detail-grid { grid-template-columns: 1fr 1fr 1fr; }
  .novels-grid { grid-template-columns: 1fr 1fr; }
}
