:root {
  color-scheme: dark;
  --bg: #080a12;
  --surface: rgba(17, 20, 34, 0.72);
  --surface-strong: rgba(23, 28, 48, 0.92);
  --text: #eef2ff;
  --muted: #99a4bd;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #7c5cff;
  --accent-2: #18d3ff;
  --success: #33d69f;
  --warning: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 999px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #111827;
  --muted: #637083;
  --line: rgba(17, 24, 39, 0.1);
  --shadow: 0 24px 60px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(24, 211, 255, 0.14), transparent 28rem),
    var(--bg);
  overflow-x: hidden;
}


[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

button,
input,
a {
  font: inherit;
}

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

.page-glow {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}

.page-glow-a {
  left: -9rem;
  top: 15rem;
  background: var(--accent);
}

.page-glow-b {
  right: -10rem;
  bottom: 10rem;
  background: var(--accent-2);
}

.site-header {
  position: fixed;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.brand,
.header-actions,
.main-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: rgba(255, 255, 255, 0.06);
  background-image: url("assets/tangha-icon.png?v=20260623-4"), linear-gradient(135deg, rgba(124, 92, 255, 0.32), rgba(24, 211, 255, 0.22));
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 82% 82%, 100% 100%;
  box-shadow: 0 10px 24px rgba(124, 92, 255, 0.24);
  overflow: hidden;
}

/* Hide any legacy inline logo image so the CSS background icon controls sizing. */
.brand-mark img {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.main-nav {
  gap: 0.4rem;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.header-actions {
  gap: 0.6rem;
}

.icon-button,
.sign-in,
.tab-button,
.action-link {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button:hover,
.sign-in:hover,
.tab-button:hover,
.action-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.lang-switch button {
  min-width: 34px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease;
}

.lang-switch button.active {
  background: var(--accent-2);
  color: #071014;
}

.icon-button .sun,
html[data-theme="light"] .icon-button .moon {
  display: none;
}

html[data-theme="light"] .icon-button .sun {
  display: inline;
}

.sign-in {
  padding: 10px 16px;
  font-weight: 650;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 128px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 2rem;
  align-items: end;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}

.hero-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-number {
  display: block;
  font-size: 4rem;
  font-weight: 820;
  letter-spacing: -0.08em;
}

.hero-label {
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tab-button {
  padding: 10px 14px;
  color: var(--muted);
}

.tab-button.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #5f7dff);
  box-shadow: 0 14px 35px rgba(124, 92, 255, 0.28);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.search-box span {
  color: var(--muted);
  font-size: 0.92rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

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

.plugin-card {
  position: relative;
  display: flex;
  min-height: 315px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.plugin-card::after {
  content: "";
  position: absolute;
  inset: auto -22% -35% 20%;
  height: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent, var(--accent)), transparent 65%);
  opacity: 0.13;
  transition: opacity 220ms ease;
}

.plugin-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 58%, var(--line));
}

.plugin-card:hover::after {
  opacity: 0.2;
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 22px;
}

.plugin-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent, var(--accent)) 28%, transparent), rgba(255, 255, 255, 0.04));
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 780;
}

.status-wrap {
  display: flex;
  align-items: start;
}

.status-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.status-badge.live {
  color: var(--success);
}

.status-badge.soon {
  color: var(--warning);
}

.status-badge.deprecated {
  color: var(--danger);
}

.plugin-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 1.28rem;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.description {
  position: relative;
  z-index: 1;
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 22px 0 18px;
}

.meta-pill {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 720;
}

.action-link.primary {
  border-color: transparent;
  color: white;
  background: linear-gradient(135deg, var(--card-accent, var(--accent)), var(--accent-2));
}

.empty-state {
  padding: 46px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted);
}

.empty-state h2 {
  margin-top: 0;
  color: var(--text);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}



body.modal-open {
  overflow: hidden;
}

.user-menu {
  position: relative;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.user-pill img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.user-provider {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  word-break: break-word;
}

.user-dropdown button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 2.3rem;
  letter-spacing: -0.055em;
}

.auth-copy,
.auth-note {
  color: var(--muted);
  line-height: 1.65;
}

.auth-copy {
  margin: 0 0 20px;
}

.auth-options {
  display: grid;
  gap: 12px;
}

.auth-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.auth-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  background: rgba(255, 255, 255, 0.075);
}

.auth-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: #111827;
  color: white;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.auth-symbol.google {
  background: white;
  color: #111827;
}

.auth-option strong,
.auth-option small {
  display: block;
}

.auth-option small {
  margin-top: 3px;
  color: var(--muted);
}

.auth-note {
  margin: 18px 0 0;
  font-size: 0.86rem;
}

@media (max-width: 980px) {
  .hero,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 320px;
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 10px;
  }

  .main-nav,
  .header-actions {
    justify-content: space-between;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .main-nav a {
    flex: 1;
    text-align: center;
  }

  .plugin-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding-top: 216px;
  }

  .plugin-card {
    min-height: auto;
  }
}
