/* ========== Theme Variables ========== */
/* Light theme (default) */
:root {
  --bg-primary: #f8f5f0;
  --bg-secondary: #f0ebe3;
  --bg-navbar: rgba(248,245,240,.88);
  --bg-footer: #eee8df;
  --bg-card: rgba(180,140,60,.06);
  --border-subtle: rgba(180,140,60,.12);
  --border-accent: rgba(180,140,60,.2);
  --accent: #c8960a;
  --accent-light: #d4a830;
  --text-primary: #2c2418;
  --text-secondary: #5a4e3c;
  --text-muted: #8a7e6a;
  --text-nav: #6b5e48;
  --shadow-card: rgba(0,0,0,.06);
  --shadow-card-hover: rgba(180,140,60,.12);
  --about-img-border: rgba(180,140,60,.2);
  --banner-overlay-start: rgba(248,245,240,.05);
  --banner-overlay-end: rgba(44,36,24,.65);
  --feature-icon-bg: linear-gradient(135deg, rgba(200,150,10,.12), rgba(200,150,10,.04));
  --toggle-bg: rgba(180,140,60,.1);
  --toggle-hover: rgba(180,140,60,.18);
}
/* Dark theme */
:root.dark {
  --bg-primary: #0d0b08;
  --bg-secondary: rgba(255,255,255,.02);
  --bg-navbar: rgba(13,11,8,.85);
  --bg-footer: #0a0806;
  --bg-card: rgba(240,200,102,.04);
  --border-subtle: rgba(240,200,102,.1);
  --border-accent: rgba(240,200,102,.2);
  --accent: #f0c866;
  --accent-light: #f0c866;
  --text-primary: #e8e0d0;
  --text-secondary: #b8ad96;
  --text-muted: #a09880;
  --text-nav: #c0b89a;
  --shadow-card: rgba(0,0,0,.3);
  --shadow-card-hover: rgba(240,200,102,.08);
  --about-img-border: rgba(240,200,102,.15);
  --banner-overlay-start: rgba(13,11,8,.1);
  --banner-overlay-end: rgba(13,11,8,.7);
  --feature-icon-bg: linear-gradient(135deg, rgba(240,200,102,.15), rgba(240,200,102,.05));
  --toggle-bg: rgba(240,200,102,.1);
  --toggle-hover: rgba(240,200,102,.2);
}

/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary); background: var(--bg-primary); line-height: 1.7; min-height: 100vh;
  transition: background .4s, color .4s;
}
a { color: inherit; text-decoration: none; transition: color .25s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ========== Utilities ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 {
  font-size: 32px; font-weight: 700; color: var(--accent);
  position: relative; display: inline-block; padding-bottom: 12px;
}
.section-title h2::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}
.section-title p { color: var(--text-muted); font-size: 15px; margin-top: 10px; }

/* ========== Navbar ========== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--bg-navbar); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background .3s;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-brand img { height: 36px; width: auto; }
.navbar-brand span { font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.navbar-right { display: flex; align-items: center; gap: 20px; }
.navbar-nav { display: flex; gap: 24px; }
.navbar-nav a {
  font-size: 15px; color: var(--text-nav); position: relative; padding: 4px 0;
  transition: color .25s;
}
.navbar-nav a:hover, .navbar-nav a.active { color: var(--accent); }
.navbar-nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width .3s;
}
.navbar-nav a:hover::after, .navbar-nav a.active::after { width: 100%; }

/* Theme toggle button */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--toggle-bg); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--accent);
  transition: background .3s, transform .3s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--toggle-hover); transform: rotate(20deg); }
/* Light mode: show moon icon (to switch to dark) */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
/* Dark mode: show sun icon (to switch to light) */
:root.dark .theme-toggle .icon-sun { display: block; }
:root.dark .theme-toggle .icon-moon { display: none; }

/* Mobile menu toggle */
.navbar-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.navbar-toggle span { display: block; width: 24px; height: 2px; background: var(--accent); transition: .3s; }

/* ========== Banner ========== */
.banner {
  position: relative; width: 100%; overflow: hidden;
  margin-top: 64px; max-height: 560px;
}
.banner img { width: 100%; object-fit: cover; }
.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--banner-overlay-start) 0%, var(--banner-overlay-end) 100%);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.banner-overlay h1 {
  font-size: 52px; font-weight: 800; color: var(--accent);
  text-shadow: 0 2px 20px rgba(200,150,10,.3);
  letter-spacing: 4px;
}
.banner-overlay > p {
  font-size: 18px; color: var(--text-secondary); margin-top: 12px; letter-spacing: 2px;
}
.banner-platforms {
  margin-top: 24px; text-align: center;
}
.banner-platforms p {
  font-size: 15px; color: #fff; line-height: 2;
  background: rgba(40,30,15,.45); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px; padding: 8px 26px; margin-top: 8px;
  display: inline-block;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  font-weight: 500;
}
:root.dark .banner-platforms p {
  background: rgba(0,0,0,.45);
  border-color: rgba(240,200,102,.25);
  color: #fff6d6;
  text-shadow: 0 1px 6px rgba(0,0,0,.9);
}

/* ========== Section: About ========== */
.section { padding: 80px 0; }
.section:nth-child(even) { background: var(--bg-secondary); }

.about-content {
  display: flex; align-items: center; gap: 48px;
}
.about-img {
  flex: 0 0 380px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 40px var(--shadow-card);
  border: 1px solid var(--about-img-border);
}
.about-img img { width: 100%; }
.about-text { flex: 1; }
.about-text h3 {
  font-size: 24px; color: var(--accent); margin-bottom: 16px;
}
.about-text p {
  font-size: 15px; color: var(--text-secondary); line-height: 2;
  text-indent: 2em;
}

/* ========== Section: Features ========== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 32px 28px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 40px var(--shadow-card-hover);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--feature-icon-bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 24px;
}
.feature-card h3 {
  font-size: 18px; color: var(--accent); margin-bottom: 12px;
}
.feature-card p {
  font-size: 14px; color: var(--text-muted); line-height: 1.8;
}

/* ========== Section: Screenshots ========== */
.screenshots-wrapper {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.screenshot-item {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform .3s, box-shadow .3s;
  cursor: pointer;
}
.screenshot-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 30px var(--shadow-card);
}
.screenshot-item img {
  width: 100%; aspect-ratio: 9/16; object-fit: cover;
}

/* ========== Lightbox ========== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  font-size: 32px; color: #fff; cursor: pointer; background: none; border: none;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-footer); border-top: 1px solid var(--border-subtle);
  padding: 32px 0; transition: background .4s;
}
.footer-inner {
  text-align: center; color: var(--text-muted); font-size: 13px; line-height: 2;
}
.footer-inner a { color: var(--text-secondary); }
.footer-inner a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
.footer-age {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 8px 20px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-secondary);
}
.footer-age .age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #2d8c3c, #1a6b28);
  color: #fff; font-size: 14px; font-weight: 700;
}

/* ========== Agreement Page ========== */
.agreement-header {
  padding: 100px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}
.agreement-header h1 { font-size: 32px; color: var(--accent); }
.agreement-header .update-date { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.agreement-body { padding: 48px 0 80px; }
.agreement-body h2 { font-size: 20px; color: var(--accent); margin: 36px 0 16px; }
.agreement-body h3 { font-size: 17px; color: var(--text-secondary); margin: 24px 0 12px; }
.agreement-body p { color: var(--text-muted); font-size: 15px; line-height: 2; margin-bottom: 12px; text-indent: 2em; }
.agreement-body ul { padding-left: 2em; margin-bottom: 16px; }
.agreement-body ul li { color: var(--text-muted); font-size: 14px; line-height: 2; list-style: disc; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .about-content { flex-direction: column; }
  .about-img { flex: none; width: 100%; max-width: 400px; margin: 0 auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshots-wrapper { grid-template-columns: repeat(3, 1fr); }
  .banner-overlay h1 { font-size: 36px; }
}
@media (max-width: 640px) {
  .navbar-nav { display: none; position: absolute; top: 64px; left: 0; width: 100%;
    background: var(--bg-navbar); flex-direction: column; padding: 16px 24px; gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .navbar-nav.open { display: flex; }
  .navbar-toggle { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .screenshots-wrapper { grid-template-columns: repeat(2, 1fr); }
  .banner-overlay h1 { font-size: 28px; }
  .banner-overlay > p { font-size: 14px; }
  .banner-platforms p { font-size: 13px; padding: 4px 16px; }
  .section-title h2 { font-size: 24px; }
  .section { padding: 48px 0; }
}
