:root {
  --bg: #0b1220;
  --bg-soft: #121a2b;
  --bg-card: #162033;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eef9;
  --muted: #9aa8c0;
  --brand: #3ea6ff;
  --brand-2: #6ec8ff;
  --accent: #f0c14b;
  --ok: #3dd68c;
  --danger: #ff6b7a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --nav-h: 72px;
  --max: 1180px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(62, 166, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(240, 193, 75, 0.08), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #0b1220 40%, #0d1524 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

ul {
  padding-left: 1.2rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

#site-header {
  height: var(--nav-h);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 32, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(62, 166, 255, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #1f7fd6);
  color: #04101f;
}

.btn-primary:hover {
  color: #04101f;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: #fff;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-panel {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(12, 19, 33, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mobile-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 26, 0.92) 0%, rgba(8, 14, 26, 0.72) 42%, rgba(8, 14, 26, 0.35) 100%),
    url("banner.3dd2.webp") center / cover no-repeat;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 4rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 0.85rem;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.35;
  margin: 0 0 1rem;
  font-weight: 600;
  color: #f5f8ff;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.6rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

section {
  padding: 4.2rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 720px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: floaty 5s ease-in-out infinite;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #05080f;
}

.category-grid,
.card-grid,
.guide-grid {
  display: grid;
  gap: 1.1rem;
}

.category-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid,
.guide-grid {
  grid-template-columns: repeat(3, 1fr);
}

.cat-card,
.article-card,
.guide-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cat-card:hover,
.article-card:hover,
.guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(62, 166, 255, 0.45);
  box-shadow: var(--shadow);
}

.cat-card a,
.article-card a,
.guide-card a {
  color: inherit;
  display: block;
}

.cat-card .thumb,
.article-card .thumb,
.guide-card .thumb {
  background: #05080f;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.cat-card .thumb img,
.article-card .thumb img,
.guide-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.cat-card:hover .thumb img,
.article-card:hover .thumb img,
.guide-card:hover .thumb img {
  transform: scale(1.04);
}

.cat-card .body,
.article-card .body,
.guide-card .body {
  padding: 1rem 1.05rem 1.2rem;
}

.cat-card h3,
.article-card h3,
.guide-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  line-height: 1.35;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.faq {
  display: grid;
  gap: 0.85rem;
}

.faq details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--brand-2);
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.9;
}

.page-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 0.7rem;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-top: 1.8rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose img.cover {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 1.2rem 0;
  background: #05080f;
  object-fit: contain;
  max-height: 420px;
}

.side-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.side-box h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.side-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-box li {
  margin-bottom: 0.7rem;
}

.side-box a {
  color: var(--text);
  font-size: 0.92rem;
}

.error-page {
  min-height: calc(100vh - var(--nav-h) - 220px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin: 0;
  background: linear-gradient(135deg, var(--brand), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 18, 0.9);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.85rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  display: block;
  margin-bottom: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(62, 166, 255, 0.12);
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.list-page .card-grid {
  margin-top: 0.5rem;
}

.promo-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(62, 166, 255, 0.12), rgba(240, 193, 75, 0.08));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem;
}

.promo-banner img {
  justify-self: center;
  max-height: 220px;
  object-fit: contain;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .promo-banner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .side-box {
    position: static;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .nav-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(8, 14, 26, 0.55) 0%, rgba(8, 14, 26, 0.92) 70%),
      url("banner.3dd2.webp") center / cover no-repeat;
  }

  .hero-content {
    padding: 3rem 0 2.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 64px;
  }

  .brand img {
    height: 34px;
    max-height: 34px;
  }

  .category-grid,
  .card-grid,
  .guide-grid,
  .brand-strip {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3rem 0;
  }
}
