/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --accent: #f4a261;
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-section: #0f1419;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --gradient: linear-gradient(135deg, #e63946 0%, #c1121f 50%, #780000 100%);
  --shadow: 0 8px 32px rgba(0,0,0,.4);
  --radius: 12px;
  --max-w: 1200px;
  --header-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}

.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-link img { height: 40px; width: auto; }
.logo-link:hover { color: var(--text); }

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-list a {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .95rem;
  transition: all .2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
  background: rgba(230,57,70,.12);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ===== Hero ===== */
.hero {
  padding: 40px 0 80px;
  background: var(--bg-section);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(230,57,70,.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(230,57,70,.15);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(230,57,70,.3);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .25s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(230,57,70,.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(230,57,70,.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== Section ===== */
.section {
  padding: 80px 0;
}

.section-alt { background: var(--bg-section); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  color: var(--primary);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .3s;
}

.feature-card:hover {
  border-color: rgba(230,57,70,.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(230,57,70,.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: .95rem;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,.8));
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity .3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
}

/* ===== Content Block ===== */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.content-block.reverse { direction: rtl; }
.content-block.reverse > * { direction: ltr; }

.content-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.content-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.content-text ul {
  list-style: none;
  margin: 20px 0;
}

.content-text ul li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-muted);
}

.content-text ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.content-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 20px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform .3s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: .95rem;
}

.faq-item.open .faq-answer { max-height: 300px; }

/* ===== Page (Legal) ===== */
.page-hero {
  padding: calc(var(--header-h) + 48px) 0 48px;
  background: var(--bg-section);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.ads-bar + .page-hero {
  padding-top: 24px;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.page-hero p { color: var(--text-muted); }

.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
  color: var(--accent);
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content ul li,
.legal-content ol li { margin-bottom: 8px; }

.legal-update {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: .9rem;
  color: var(--text-muted);
}

/* ===== CTA ===== */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand img { height: 36px; margin-bottom: 16px; }

.footer-brand p {
  color: var(--text-muted);
  font-size: .9rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: .95rem;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
  color: var(--text-muted);
  font-size: .9rem;
}

.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: .85rem;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: .85rem; }

/* ===== 404 Error Page ===== */
.error-page {
  min-height: calc(100vh - var(--header-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 80px;
  text-align: center;
}

.error-inner { max-width: 560px; }

.error-code {
  font-size: clamp(5rem, 15vw, 8rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: .85;
}

.error-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 16px;
}

.error-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.error-links a {
  color: var(--text-muted);
  font-size: .9rem;
}

.error-links a:hover { color: var(--primary); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 12px 0;
  font-size: .85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-grid,
  .content-block { grid-template-columns: 1fr; }
  .content-block.reverse { direction: ltr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
    flex-shrink: 0;
  }

  .header-inner nav { position: static; }

  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-list.open { display: flex; }

  .features-grid,
  .gallery-grid,
  .stats-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .hero { padding-bottom: 48px; }
  .section { padding: 56px 0; }
}
