/* ============================================================
   common.css — GiftShow 共享基础样式
   适用于：index.html / download.html / changelog.html / tutorial-*.html
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
  --nav-h: 69px; /* 顶部导航栏高度，供 tutorial.css 等使用 */
  --bg: #07070f;
  --surface: #0f0f1e;
  --card: #13132a;
  --border: rgba(255,255,255,0.07);
  --accent: #ff3c6e;
  --accent2: #ff8c00;
  --glow: #ff3c6e44;
  --text: #f0eeff;
  --muted: #8888aa;
  --cyan: #25f4ee;
  --green: #6ee7b7;
  --yellow: #fbbf24;
  --purple: #a5b4fc;
  --paypal-gold: #ffc439;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background atmosphere gradient */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(255,60,110,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(37,244,238,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 60% 30%, rgba(255,140,0,0.05) 0%, transparent 50%);
}

/* Noise texture */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
}

section, nav, footer, .ticker-bar, .float-bar { position: relative; z-index: 1; }

/* ── NAV（主页/下载/更新日志页的顶部导航，排除教程页侧边栏）── */
nav:not(.sidebar) {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 60px; border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px); background: rgba(7,7,15,.88);
  position: sticky; top: 0; z-index: 200;
}
.logo-img { height: 36px; display: block; flex-shrink: 0; }
/* text logo fallback (changelog/download pages) */
.logo-text {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem;
  text-decoration: none; color: var(--text);
}
.logo-text span { color: var(--accent); }

.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .88rem;
  font-weight: 500; transition: color .2s; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active,
.nav-links a.nav-active { color: var(--accent); border-bottom-color: var(--accent); }

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

/* ── Language Toggle ── */
.lang-toggle {
  display: flex; gap: 3px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px;
}
.lang-btn {
  padding: 4px 10px; border-radius: 4px; border: none;
  background: transparent; color: var(--muted);
  font-size: .75rem; font-weight: 600; cursor: pointer;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.lang-btn.active { background: var(--accent); color: #fff; }

/* ── Hamburger ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none; z-index: 201;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav ── */
.mobile-nav {
  display: none; position: fixed; inset: 0;
  background: rgba(7,7,15,.97); z-index: 199;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 32px; backdrop-filter: blur(20px);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text); text-decoration: none;
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.6rem; letter-spacing: -.02em; transition: color .2s;
}
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav .m-actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Nav Buy Button ── */
.nav-cta {
  background: var(--accent); color: #fff; border: none;
  padding: 10px 22px; border-radius: 6px;
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  font-size: .88rem; cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .15s; white-space: nowrap;
}
.nav-cta:hover { opacity: .85; transform: translateY(-1px); }

/* ── Shared Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c4183c);
  color: #fff; border: none; padding: 15px 34px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow: 0 0 30px var(--glow); transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px var(--glow); }

.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: 15px 34px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 1rem;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(255,60,110,.06); }

/* ── Section Base ── */
.section { padding: 96px 60px; }
.section.alt { background: var(--surface); }
.section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.9rem,3.5vw,2.9rem); letter-spacing: -.02em;
  margin-bottom: 14px; line-height: 1.15;
}
.section-sub {
  color: var(--muted); font-size: 1.05rem; max-width: 540px;
  margin-bottom: 52px; font-weight: 300; line-height: 1.7;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border); padding: 56px 60px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px;
}
.footer-brand .logo-img-ft { height: 32px; margin-bottom: 14px; display: block; }
.footer-brand p { color: var(--muted); font-size: .83rem; line-height: 1.8; max-width: 280px; }
.footer-brand .f-socials { display: flex; gap: 9px; margin-top: 16px; }
.f-social-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; text-decoration: none; color: var(--muted); transition: all .2s;
}
.f-social-btn:hover { border-color: var(--accent); color: var(--accent); }
.footer-col h4 {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .77rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 15px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 60px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: .78rem; flex-wrap: wrap; gap: 10px;
  position: relative; z-index: 1;
}

/* ── I18N — managed by #gs-lang-style dynamic <style> tag ── */
/* 注意：不在这里写任何 display:none 规则，全部交由 js/i18n.js 动态注入 */

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .section, .section.alt { padding: 60px 20px; }
  footer { padding: 36px 20px; grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { padding: 16px 20px; }
}
