:root {
  color-scheme: light;
  --bg: #f5f9ff;
  --ink: #12213a;
  --muted: #60708a;
  --line: #d9e7fb;
  --panel: #ffffff;
  --soft: #eaf4ff;
  --brand: #0d6efd;
  --brand-2: #4aa7ff;
  --violet: #6b66ff;
  --green: #17b890;
  --shadow: 0 18px 54px rgba(21, 84, 158, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef7ff 0, #f8fbff 560px, #ffffff 100%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  max-width: 100%;
}

.site-header,
main,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(20, 86, 165, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--violet));
}

.brand strong,
.admin-brand strong {
  display: block;
  font-size: 0.98rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links button,
.footer-links button,
.footer-links a {
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links button:hover,
.footer-links button:hover,
.footer-links a:hover {
  color: var(--brand);
  background: var(--soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-button img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.language-switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 8px;
  background: #edf5ff;
}

.language-switch button {
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.language-switch button.active {
  color: #fff;
  background: var(--brand);
}

.primary,
.secondary,
.support-button,
.article-card button,
.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 900;
}

.primary,
.support-button,
.admin-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  box-shadow: 0 14px 28px rgba(13, 110, 253, 0.22);
}

.secondary,
.article-card button {
  color: var(--brand);
  background: #eaf4ff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(440px, 1fr);
  gap: 34px;
  align-items: center;
  padding: 52px 0 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.section-heading h2,
.article-detail h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.7rem, 5.5vw, 5.8rem);
}

.hero p:not(.eyebrow),
.page-hero p,
.section-heading p,
.feature-card p,
.article-card p,
.ad-slot p,
.site-footer p,
.article-detail p,
.faq-list p,
.muted {
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.hero-tags,
.global-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.global-points span,
.tag {
  padding: 8px 11px;
  border-radius: 8px;
  color: #1463c9;
  background: #e8f3ff;
  font-size: 0.86rem;
  font-weight: 900;
}

.hero-visual {
  padding: 12px;
  border: 1px solid rgba(13, 110, 253, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  border-radius: 8px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.metric-row article,
.feature-card,
.article-card,
.ad-slot,
.faq-list details,
.admin-card,
.article-detail,
.page-hero,
.category-sidebar {
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(32, 92, 160, 0.08);
}

.metric-row article {
  padding: 22px;
}

.metric-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 2rem;
}

.section {
  padding-top: 62px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.page-hero h1 {
  max-width: 760px;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
}

.card-grid,
.article-grid,
.ad-grid {
  display: grid;
  gap: 16px;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.article-card,
.ad-slot {
  padding: 22px;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.feature-card h3,
.article-card h3 {
  margin: 0 0 8px;
}

.global-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(440px, 1fr);
  gap: 28px;
  align-items: center;
}

.global-card {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(107, 102, 255, 0.14));
}

.global-card img {
  display: block;
  border-radius: 8px;
}

.ad-slot {
  min-height: 128px;
  display: grid;
  align-content: center;
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.05), rgba(23, 184, 144, 0.05)),
    #fff;
}

.ad-slot strong {
  color: var(--brand);
}

.articles-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.category-sidebar {
  height: fit-content;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.category-sidebar button {
  border: 0;
  border-radius: 8px;
  padding: 12px 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 900;
}

.category-sidebar button.active,
.category-sidebar button:hover {
  color: var(--brand);
  background: var(--soft);
}

.article-card button {
  margin-top: 10px;
}

.page-hero,
.article-detail {
  margin-top: 32px;
  padding: 42px;
}

.article-meta {
  color: var(--brand);
  font-weight: 900;
}

.article-detail h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 4rem);
}

.article-content {
  max-width: 820px;
  margin-top: 26px;
  color: #40536c;
  line-height: 1.9;
}

.article-content h2 {
  margin-top: 28px;
  color: var(--ink);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 20px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 70px 0 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.float-support {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 6px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #2aa9e0;
  box-shadow: 0 18px 42px rgba(13, 110, 253, 0.3);
}

.float-support img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.float-support span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.login-page h1 {
  font-size: clamp(2.6rem, 5vw, 5.6rem);
  line-height: 1.05;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: #f3f8ff;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #fff;
  background: #071427;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar button {
  border: 0;
  border-radius: 8px;
  padding: 12px 13px;
  color: #b8c8dd;
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.admin-sidebar button.active,
.admin-sidebar button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-main {
  padding: 26px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.3rem);
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-card {
  padding: 22px;
}

.admin-card strong {
  display: block;
  color: var(--brand);
  font-size: 1.8rem;
}

.admin-panel {
  padding: 24px;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(32, 92, 160, 0.08);
}

.editor-grid,
.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 390px;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #263952;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
}

textarea {
  resize: vertical;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 110px;
  gap: 10px;
  margin: 14px 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

td small {
  display: block;
  color: var(--muted);
}

.status {
  display: inline-flex;
  border-radius: 8px;
  padding: 6px 9px;
  color: #1263c9;
  background: #eaf4ff;
  font-weight: 900;
}

.status.draft {
  color: #8d5d05;
  background: #fff3d1;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions button,
.panel-button {
  border: 0;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--brand);
  background: var(--soft);
  font-weight: 900;
}

.storage-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #cfe1fb;
  border-radius: 8px;
  color: #32506f;
  background: #f7fbff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.media-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.media-grid img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .hero,
  .global-section,
  .login-page {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .article-grid,
  .metrics,
  .metric-row,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-grid,
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .brand small,
  .support-button span {
    display: none;
  }

  .language-switch {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .card-grid,
  .article-grid,
  .ad-grid,
  .metric-row,
  .articles-layout,
  .site-footer,
  .media-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .article-detail {
    padding: 28px 20px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-main {
    padding: 16px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}
