/* === VARIABLES === */
:root {
  --bg: #0a0806;
  --bg2: #141210;
  --bg3: #1c1916;
  --ink: #e8e4dc;
  --muted: #8a8278;
  --rule: #2a2520;
  --accent: #c9a84c;
  --accent-dim: #8a7340;
  --font: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-display: 'Georgia', 'Microsoft YaHei', 'PingFang SC', serif;
  --max: 1200px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* === COMMON === */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }
.sec-title { text-align: center; margin-bottom: 2.5rem; }
.sec-title h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 600;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 1rem;
  letter-spacing: 0.05em;
}
.sec-title h2::before, .sec-title h2::after {
  content: ''; display: block;
  width: 40px; height: 1px; background: var(--accent-dim);
}
.sec-title p { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* === TOPBAR === */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(10,8,6,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 64px;
}
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px; border: 2px solid var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--accent);
}
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  color: var(--accent); line-height: 1.2; letter-spacing: 0.05em;
}
.logo-sub { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.08em; }
.topnav { display: flex; gap: 0.2rem; list-style: none; }
.topnav a {
  color: var(--muted); text-decoration: none; font-size: 0.88rem;
  padding: 0.5rem 1rem; border-radius: 4px;
  transition: color 0.2s; position: relative;
}
.topnav a:hover, .topnav a.active { color: var(--accent); }
.topnav a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%); width: 20px; height: 2px;
  background: var(--accent); border-radius: 1px;
}

/* === HAMBURGER === */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--accent); border-radius: 1px; transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
.hero {
  position: relative; min-height: 50vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 5rem 1.5rem 3rem;
  background: linear-gradient(to bottom, rgba(10,8,6,0.2) 0%, rgba(10,8,6,0.85) 100%), url('hero-city.jpg');
  background-size: cover; background-position: center;
}
.hero-brand {
  font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 600; color: var(--accent); letter-spacing: 0.1em;
  margin-bottom: 0.3rem; text-shadow: 0 0 40px rgba(201,168,76,0.2);
}
.hero-brand small {
  display: block; font-size: 0.35em; color: var(--muted);
  letter-spacing: 0.3em; margin-top: 0.3rem;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600; color: var(--ink); margin: 1rem 0 0.5rem;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: 1rem; color: var(--muted); max-width: 520px;
  margin-bottom: 2rem; line-height: 1.8;
}

/* === TWO-COL PANEL === */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.panel {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 8px; overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule);
}
.panel-header h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--accent); display: flex; align-items: center; gap: 0.5rem;
}
.panel-header h3::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--accent); transform: rotate(45deg);
}
.panel-header a {
  font-size: 0.8rem; color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.panel-header a:hover { color: var(--accent); }

/* === NEWS LIST === */
.news-list { padding: 0.5rem 0; }
.news-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.75rem 1.2rem; border-bottom: 1px solid var(--rule);
  text-decoration: none; transition: background 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(201,168,76,0.03); }
.news-tag {
  font-size: 0.65rem; font-weight: 600; padding: 0.15rem 0.4rem;
  border-radius: 3px; white-space: nowrap;
}
.news-tag.new { background: rgba(201,168,76,0.12); color: var(--accent); }
.news-tag.notice { background: rgba(138,130,120,0.12); color: var(--muted); }
.news-tag.ban { background: rgba(139,0,0,0.15); color: #c44; }
.news-text {
  flex: 1; font-size: 0.88rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.news-date { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* === DOWNLOAD CARDS === */
.dl-list { padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.dl-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.dl-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 20px rgba(201,168,76,0.08);
}
.dl-card-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.dl-icon {
  width: 48px; height: 48px; background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.dl-title-wrap { flex: 1; }
.dl-title-wrap h4 {
  font-family: var(--font-display); font-size: 1.15rem;
  font-weight: 600; color: var(--accent); margin-bottom: 0.2rem;
}
.dl-meta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: var(--accent-dim);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 0.2rem 0.55rem; border-radius: 4px;
  letter-spacing: 0.03em;
}
.dl-desc {
  font-size: 0.88rem; color: var(--muted);
  margin: 0.7rem 0 0.7rem; line-height: 1.7;
}
.dl-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem; margin: 0.6rem 0 1rem;
  padding: 0.75rem; background: rgba(10,8,6,0.5);
  border: 1px solid var(--rule); border-radius: 8px;
}
.dl-features div {
  font-size: 0.78rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.3rem;
}
.dl-features div::before {
  content: '✓'; color: var(--accent); font-weight: 600;
}
.dl-btns { display: flex; gap: 0.5rem; }
.dl-btn {
  flex: 1; display: inline-block; text-align: center;
  font-size: 0.85rem; padding: 0.6rem 0.8rem; border-radius: 6px;
  text-decoration: none; border: 1px solid var(--rule);
  color: var(--muted); background: var(--bg3);
  transition: all 0.2s; cursor: pointer;
  font-family: inherit; user-select: none;
}
.dl-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(201,168,76,0.05);
}
.dl-btn.primary {
  background: linear-gradient(135deg, #c9a84c 0%, #a88a3a 100%);
  color: var(--bg); border-color: transparent; font-weight: 600;
}
.dl-btn.primary:hover {
  background: linear-gradient(135deg, #d4b55a 0%, #b89645 100%);
  color: var(--bg);
}

/* === GAME INTRO === */
.intro-wrap {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
}
.intro-carousel {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--rule); aspect-ratio: 4 / 3;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.intro-carousel .slides { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); height: 100%; }
.intro-carousel .slides img {
  width: 100%; flex-shrink: 0; display: block; object-fit: cover; height: 100%;
}
.carousel-dots {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; background: rgba(0,0,0,0.45);
  padding: 0.35rem 0.7rem; border-radius: 20px; backdrop-filter: blur(4px);
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.3s;
}
.carousel-dots button.active { background: var(--accent); width: 22px; border-radius: 4px; }
.intro-text h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem;
}
.intro-text p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; line-height: 1.8; }
.intro-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.intro-links a {
  color: var(--accent); text-decoration: none; font-size: 0.88rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.3rem; transition: gap 0.2s;
}
.intro-links a:hover { gap: 0.5rem; }

/* === FEATURE CARDS === */
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }
.feature-card {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 8px; padding: 1.8rem 1.2rem; text-align: center;
  transition: all 0.3s;
}
.feature-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: rgba(201,168,76,0.08); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.feature-card h4 {
  font-family: var(--font-display); font-size: 1rem;
  font-weight: 600; color: var(--ink); margin-bottom: 0.5rem;
}
.feature-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* === TABS === */
.tabs-header {
  display: flex; gap: 0.5rem; justify-content: center;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.tab-btn {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 500;
  padding: 0.6rem 1.4rem; background: var(--bg2);
  border: 1px solid var(--rule); border-radius: 6px;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.tab-btn:hover { color: var(--ink); border-color: var(--accent-dim); }
.tab-btn.active {
  background: var(--accent); color: var(--bg);
  border-color: var(--accent); font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === TABLE === */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 500px; }
th {
  background: var(--bg3); color: var(--accent); font-family: var(--font-display);
  font-weight: 600; font-size: 0.82rem; padding: 0.8rem 1rem;
  text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
td { padding: 0.7rem 1rem; color: var(--muted); border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(201,168,76,0.03); }
td strong { color: var(--ink); }
.highlight { color: var(--accent); font-weight: 600; }

/* === EXP BARS === */
.exp-list { display: flex; flex-direction: column; gap: 0.7rem; }
.exp-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 6px; padding: 0.85rem 1.2rem;
}
.exp-label {
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink); min-width: 100px; font-size: 0.88rem;
}
.exp-track { flex: 1; height: 10px; background: var(--bg3); border-radius: 5px; overflow: hidden; }
.exp-fill { height: 100%; border-radius: 5px; background: var(--accent); box-shadow: 0 0 10px rgba(201,168,76,0.25); }
.exp-val {
  font-family: var(--font-display); font-weight: 600;
  color: var(--accent); min-width: 70px; text-align: right; font-size: 0.9rem;
}

/* === SUMMON GRID === */
.summon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.summon-col { background: var(--bg2); border: 1px solid var(--rule); border-radius: 8px; padding: 1.5rem; }
.summon-col h4 {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  color: var(--accent); margin-bottom: 1rem; text-align: center;
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--rule);
}
.summon-list { display: flex; flex-direction: column; gap: 0.5rem; }
.summon-list div {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.5rem 0.8rem; background: var(--bg3);
  border-radius: 4px; font-size: 0.88rem; color: var(--muted);
}
.summon-list div span { color: var(--ink); font-weight: 600; min-width: 50px; }
.summon-list div.highlight { border: 1px solid var(--accent-dim); }
.summon-list div.highlight span, .summon-list div.highlight { color: var(--accent); }

@media (max-width: 600px) {
  .summon-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* === RULE CARDS === */
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.rule-card {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 8px; padding: 1.5rem; transition: border-color 0.25s;
}
.rule-card:hover { border-color: var(--accent-dim); }
.rule-card h4 {
  font-family: var(--font-display); font-size: 1rem;
  font-weight: 600; color: var(--accent); margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.rule-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin: 0; }

/* === FOOTER === */
footer { background: var(--bg2); border-top: 1px solid var(--rule); padding: 3rem 0 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem; margin-bottom: 2rem;
}
.footer-col h4 {
  font-family: var(--font-display); font-size: 0.95rem;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem;
}
.footer-col p, .footer-col a {
  font-size: 0.85rem; color: var(--muted); line-height: 1.8;
  text-decoration: none; display: block;
}
.footer-col a:hover { color: var(--accent); }
.footer-about .ft-logo {
  font-family: var(--font-display); font-size: 1.2rem;
  color: var(--accent); margin-bottom: 0.5rem;
}
.footer-bottom {
  text-align: center; padding-top: 2rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 0.78rem; line-height: 1.8;
}

/* === BACK TO TOP === */
.backtop {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px; background: var(--bg2);
  border: 1px solid var(--rule); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
  opacity: 0; pointer-events: none;
}
.backtop.visible { opacity: 1; pointer-events: all; }
.backtop:hover { border-color: var(--accent); color: var(--accent); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .intro-wrap, .rule-grid { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .hamburger { display: flex; }
  .topnav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,8,6,0.98); border-bottom: 1px solid var(--rule);
    flex-direction: column; padding: 0.5rem 1.5rem 1rem; gap: 0;
  }
  .topnav.show { display: flex; }
  .topnav a { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .topnav a:last-child { border-bottom: none; }
  .topnav a.active::after { display: none; }
  .hero { min-height: 40vh; padding: 4rem 1rem 2rem; }
  .hero-brand { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-title { font-size: clamp(1.2rem, 5vw, 1.8rem); }
  .hero-sub { font-size: 0.9rem; }
  section { padding: 2.5rem 0; }
  .sec-title h2 { font-size: 1.2rem; }
  .sec-title h2::before, .sec-title h2::after { width: 24px; }
  .news-item { padding: 0.65rem 1rem; gap: 0.6rem; }
  .news-text { font-size: 0.82rem; }
  .news-date { font-size: 0.7rem; }
  .dl-card { padding: 1rem; }
  .dl-card-header { gap: 0.6rem; }
  .dl-icon { width: 36px; height: 36px; font-size: 1rem; }
  .dl-title-wrap h4 { font-size: 1rem; }
  .dl-desc { font-size: 0.8rem; margin: 0.4rem 0 0.6rem; }
  .dl-features { grid-template-columns: 1fr 1fr; padding: 0.6rem; }
  .dl-features div { font-size: 0.72rem; }
  .dl-btns { flex-wrap: wrap; }
  .dl-btn { font-size: 0.8rem; padding: 0.5rem 0.6rem; flex: 1 1 calc(50% - 0.25rem); }
  .dl-btn:nth-child(3) { flex: 1 1 100%; margin-top: 0.25rem; }
  .intro-wrap { gap: 1.5rem; }
  .intro-text h3 { font-size: 1.1rem; }
  .intro-text p { font-size: 0.88rem; }
  .intro-links { flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
  .feature-grid { gap: 0.8rem; }
  .feature-card { padding: 1.2rem 0.8rem; }
  .feature-icon { width: 44px; height: 44px; font-size: 1.3rem; margin-bottom: 0.6rem; }
  .feature-card h4 { font-size: 0.9rem; }
  .tabs-header { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; }
  .tabs-header::-webkit-scrollbar { height: 3px; }
  .tabs-header::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 2px; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .exp-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .exp-label { min-width: auto; }
  .exp-track { width: 100%; }
  .exp-val { min-width: auto; text-align: left; }
  .rule-card { padding: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-col h4 { font-size: 0.9rem; }
  .backtop { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
}
@media (max-width: 500px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .news-date { display: none; }
  .dl-btn { flex: 1 1 100%; }
  .dl-btn:nth-child(3) { margin-top: 0; }
  .hero-brand small { letter-spacing: 0.15em; }
}
@media (max-width: 360px) {
  .topbar-inner { padding: 0 1rem; }
  .container { padding: 0 1rem; }
  .logo-name { font-size: 1rem; }
  .logo-sub { font-size: 0.6rem; }
  .hero-brand { font-size: 2.2rem; }
  .hero-title { font-size: 1.1rem; }
  .sec-title h2 { font-size: 1.05rem; gap: 0.6rem; }
  .sec-title h2::before, .sec-title h2::after { width: 16px; }
  .tab-btn { font-size: 0.8rem; padding: 0.5rem 1rem; }
}

/* === FLOAT IMAGE === */
.float-image-container {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 431px;
  z-index: 9999;
}
.float-image {
  width: 200px;
  height: 431px;
}
.float-btn {
  position: absolute;
  top: 325px;
  left: 50px;
  width: 100px;
  height: 39px;
  cursor: pointer;
  border: none;
  padding: 0;
  background: transparent;
}
.float-btn img {
  width: 100%;
  height: 100%;
  display: block;
}
