:root {
  --bg: #071018;
  --bg-elevated: #0d1a26;
  --bg-soft: #122433;
  --line: rgba(120, 170, 210, 0.18);
  --text: #e8f1f8;
  --muted: #9bb0c3;
  --accent: #3ba7e8;
  --accent-2: #1f7fbd;
  --gold: #d4a84b;
  --danger: #e85d5d;
  --radius: 14px;
  --header-h: 72px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", 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 500px at 10% -10%, rgba(59, 167, 232, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(212, 168, 75, 0.1), transparent 55%),
    linear-gradient(180deg, #08121c 0%, var(--bg) 40%, #050b12 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7cc8f5;
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 16, 24, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 44px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.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: var(--text);
  background: rgba(59, 167, 232, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
}

.btn-primary:hover {
  color: #041018;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(59, 167, 232, 0.45);
  color: var(--text);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(320px, 100%);
  bottom: 0;
  background: rgba(8, 16, 24, 0.98);
  border-left: 1px solid var(--line);
  padding: 1.25rem;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.mobile-panel.open {
  transform: translateX(0);
}

.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
}

body.menu-open .menu-backdrop {
  display: block;
}

.mobile-panel a {
  display: block;
  color: var(--text);
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-auth {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.mobile-auth .btn {
  width: 100%;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-panel {
  display: block;
}

.page-main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 11, 18, 0.92) 0%, rgba(5, 11, 18, 0.55) 48%, rgba(5, 11, 18, 0.35) 100%),
    linear-gradient(0deg, rgba(5, 11, 18, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #f4f8fc, #8fd0f5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  margin-bottom: 0.85rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  color: #c5d5e4;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section {
  padding: 4.2rem 0;
}

.section-head {
  margin-bottom: 1.8rem;
  max-width: 42rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-panel {
  background: linear-gradient(160deg, rgba(18, 36, 51, 0.9), rgba(10, 20, 30, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.intro-panel img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.stat {
  background: rgba(59, 167, 232, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
}

.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 167, 232, 0.45);
}

.category-item img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: linear-gradient(180deg, #101c28, #0a1420);
  padding: 0.75rem;
}

.category-item figcaption {
  padding: 0.85rem 1rem 1.1rem;
}

.category-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.category-item p {
  font-size: 0.86rem;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 167, 232, 0.4);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a1420;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.05);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.tag {
  color: var(--accent);
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card .body p {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 54px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(0.95);
  opacity: 0.9;
  transition: opacity 0.2s ease, filter 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.4rem;
  border: 1px solid var(--line);
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 860px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 26, 38, 0.85);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 1.15rem 1.1rem;
  margin: 0;
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(31, 127, 189, 0.25), rgba(7, 16, 24, 0.2)),
    var(--bg-elevated);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.cta-band img {
  justify-self: end;
  max-height: 120px;
  width: auto;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #050b12;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 167, 232, 0.08), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.55;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: rgba(13, 26, 38, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}

.prose h2 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.25rem;
  font-size: 1.1rem;
}

.prose img {
  border-radius: 12px;
  margin: 1rem 0 1.2rem;
  width: 100%;
  object-fit: cover;
  max-height: 420px;
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.side-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-list a {
  display: block;
  color: var(--muted);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.side-list a:last-child {
  border-bottom: 0;
}

.side-list a:hover {
  color: var(--accent);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  background: linear-gradient(135deg, var(--accent), #d4a84b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  max-width: 32rem;
  margin-inline: auto;
}

.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.guide-row:hover {
  border-color: rgba(59, 167, 232, 0.4);
  transform: translateY(-2px);
}

.guide-row img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.guide-row .text {
  padding: 0.9rem 1rem 0.9rem 0;
}

.guide-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.guide-row h3 a {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.ext-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-band img {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-actions .auth-desktop {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: 70vh;
  }

  .card-grid,
  .related-grid,
  .category-grid,
  .brand-strip,
  .footer-grid,
  .intro-stats {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-row {
    grid-template-columns: 1fr;
  }

  .guide-row img {
    height: 160px;
  }

  .guide-row .text {
    padding: 0 1rem 1rem;
  }

  .section {
    padding: 3rem 0;
  }
}
