:root {
  --kt-obsidian: #1F2937;
  --kt-blue: #3B82F6;
  --kt-gold: #FBBF24;
  --kt-night: #09090b;
  --font-display: 'Ma Shan Zheng', cursive;
  --font-body: 'Noto Sans SC', sans-serif;
  --text-hero: clamp(2rem, 6vw, 3.5rem);
  --text-h2: clamp(1.75rem, 4vw, 2.75rem);
  --text-h3: clamp(1.25rem, 3vw, 1.75rem);
  --text-body: clamp(0.9375rem, 1.5vw, 1.0625rem);
  --text-sm: clamp(0.8125rem, 1.2vw, 0.9375rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--kt-night);
  color: #f8fafc;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.kt-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.kt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(9,9,11,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.kt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.kt-logo-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  background: linear-gradient(90deg, var(--kt-gold), #fff 60%, var(--kt-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav { display: none; gap: 2rem; }

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  font-weight: 500;
  color: #cbd5e1;
  transition: color 0.25s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--kt-gold);
  transition: width 0.25s;
}
.nav-link:hover,
.nav-link.active { color: var(--kt-gold); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  background: rgba(59,130,246,0.12);
  color: var(--kt-gold);
  font-size: 1.25rem;
  border: 1px solid rgba(59,130,246,0.25);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(31,41,55,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu .nav-link {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.03);
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

.kt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 700;
  font-size: var(--text-body);
  border-radius: 9999px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}
.kt-btn:hover { transform: translateY(-2px); }
.kt-btn-primary {
  background: linear-gradient(135deg, #2563EB, var(--kt-blue));
  color: #fff;
  box-shadow: 0 0 24px rgba(59,130,246,0.45);
}
.kt-btn-gold {
  background: linear-gradient(135deg, #F59E0B, var(--kt-gold));
  color: #1f2937;
  box-shadow: 0 0 20px rgba(251,191,36,0.35);
}
.kt-btn-outline {
  background: transparent;
  color: var(--kt-blue);
  border: 1px solid var(--kt-blue);
}

.kt-page-header {
  position: relative;
  padding: 9rem 0 3rem;
  background: linear-gradient(180deg, rgba(59,130,246,0.1), transparent), var(--kt-night);
  text-align: center;
}
.kt-page-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.kt-page-header .meta {
  color: #94a3b8;
  font-size: var(--text-sm);
}
.kt-page-header .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: var(--text-sm);
  justify-content: center;
}
.breadcrumb a:hover { color: var(--kt-gold); }

/* Article content */
.kt-article {
  padding: 3rem 0 5rem;
  background: var(--kt-night);
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 1.5rem;
  background: rgba(31,41,55,0.45);
  border: 1px solid rgba(255,255,255,0.08);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--kt-gold);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.article-body h3 {
  font-size: 1.125rem;
  color: #fff;
  margin: 1.5rem 0 0.75rem;
}

.article-body p {
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: var(--kt-gold);
  font-weight: 700;
}

.article-body a {
  color: var(--kt-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.article-body .highlight-box {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(59,130,246,0.1);
  border-left: 4px solid var(--kt-blue);
  color: #bfdbfe;
  margin: 1.5rem 0;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (max-width: 640px) {
  .article-body {
    padding: 1.25rem;
  }
}

.kt-footer {
  padding: 4rem 0 2rem;
  background: #050507;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
.footer-brand h2 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--kt-gold);
  margin-bottom: 0.75rem;
}
.footer-brand p { color: #94a3b8; font-size: var(--text-sm); }
.footer-col h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  border-left: 3px solid var(--kt-blue);
  padding-left: 0.75rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-col li,
.footer-col a {
  color: #94a3b8;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col a:hover { color: var(--kt-gold); }
.footer-qr {
  width: 96px;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 2px solid rgba(255,255,255,0.1);
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: #64748b;
  font-size: var(--text-sm);
}

/* Friend links */
.kt-friends {
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin: 2rem 0;
}

.kt-friends-title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: #fff;
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.kt-friends-title::after {
  content: '';
  display: block;
  width: 60%;
  height: 2px;
  margin: 0.4rem auto 0;
  background: linear-gradient(90deg, transparent, var(--kt-gold), transparent);
}

.kt-friends-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

.kt-friends-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(31,41,55,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  font-size: var(--text-sm);
  transition: all 0.25s;
  max-width: 100%;
  word-break: keep-all;
  white-space: nowrap;
}

.kt-friends-list a:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.4);
  color: var(--kt-gold);
  transform: translateY(-2px);
}

@media (max-width: 375px) {
  .kt-friends-list {
    gap: 0.5rem;
  }
  .kt-friends-list a {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

.kt-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  background: rgba(31,41,55,0.96);
  color: #fff;
  border: 1px solid rgba(251,191,36,0.45);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  font-size: var(--text-sm);
  opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
  pointer-events: none;
}
.kt-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
