/* 星钥 API brand layer for the New API console.
   Keeps the console layout and light/dark mode while sharing the public site's
   typography, cyan-to-violet accents, and light/dark surface palette. */

:root {
  --font-ui-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: var(--font-ui-sans);
}

:root:not(.dark):not([data-theme-preset]) {
  color-scheme: light;
  --background: #f5f7fb;
  --foreground: #161b2e;
  --card: #ffffff;
  --card-foreground: #161b2e;
  --popover: #ffffff;
  --popover-foreground: #161b2e;
  --primary: #6366f1;
  --primary-foreground: #ffffff;
  --secondary: #eef1f8;
  --secondary-foreground: #334155;
  --muted: #eef1f8;
  --muted-foreground: #64708b;
  --accent: #edf1fb;
  --accent-foreground: #26324b;
  --border: #e1e7f1;
  --input: #dce2ee;
  --ring: #0891b2;
  --sidebar: #ffffff;
  --sidebar-foreground: #35405a;
  --sidebar-primary: #6366f1;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #eff3fc;
  --sidebar-accent-foreground: #26324b;
  --sidebar-border: #e4e8f0;
  --sidebar-ring: #0891b2;
  --chart-1: #06b6d4;
  --chart-2: #6366f1;
  --chart-3: #8b5cf6;
  --chart-4: #0d9488;
  --chart-5: #b45309;
}

:root.dark:not([data-theme-preset]),
body.dark:not([data-theme-preset]) {
  color-scheme: dark;
  --background: #0b0d14;
  --foreground: #f4f6fb;
  --card: #10131d;
  --card-foreground: #f4f6fb;
  --popover: #10131d;
  --popover-foreground: #f4f6fb;
  --primary: #8b5cf6;
  --primary-foreground: #ffffff;
  --secondary: #1b2030;
  --secondary-foreground: #d8dff5;
  --muted: #161b29;
  --muted-foreground: #a2a9bd;
  --accent: #1d2434;
  --accent-foreground: #f4f6fb;
  --border: rgba(255, 255, 255, .10);
  --input: rgba(255, 255, 255, .17);
  --ring: #22d3ee;
  --sidebar: #0b0d14;
  --sidebar-foreground: #e5e9f5;
  --sidebar-primary: #8b5cf6;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #171d2b;
  --sidebar-accent-foreground: #f4f6fb;
  --sidebar-border: rgba(255, 255, 255, .10);
  --sidebar-ring: #22d3ee;
  --chart-1: #22d3ee;
  --chart-2: #818cf8;
  --chart-3: #a78bfa;
  --chart-4: #34d399;
  --chart-5: #fbbf24;
}

html,
body {
  font-family: var(--font-ui-sans);
  -webkit-font-smoothing: antialiased;
}

/* Slightly enlarge compact UI copy while keeping existing line-height and layout. */
.text-xs {
  font-size: 13px !important;
}

.text-sm {
  font-size: 15px !important;
}

/* Keep the New API console header brand consistent with the public homepage. */
header a[aria-label="返回主页"] > div {
  background-image: linear-gradient(120deg, #06b6d4 0%, #6366f1 52%, #8b5cf6 100%);
}

header a[aria-label="返回主页"] > div img {
  display: none;
}

header a[aria-label="返回主页"] > div::after {
  content: "S";
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

header a[aria-label="返回主页"] > span {
  font-size: 0 !important;
}

header a[aria-label="返回主页"] > span::after {
  content: "星钥API";
  font-size: 15px;
  font-weight: 600;
}

/* Keep the API, announcement, and uptime boxes aligned, then grow with their content. */
div.overflow-hidden.rounded-2xl.border.bg-card.shadow-xs:has(svg.lucide-route) > div:nth-child(2),
div.overflow-hidden.rounded-2xl.border.bg-card.shadow-xs:has(svg.lucide-megaphone) > div:nth-child(2),
div.overflow-hidden.rounded-2xl.border.bg-card.shadow-xs:has(svg.lucide-activity) > div:nth-child(2) {
  height: auto !important;
  min-height: 20.5rem !important;
}

div.overflow-hidden.rounded-2xl.border.bg-card.shadow-xs:has(svg.lucide-route) div.h-72,
div.overflow-hidden.rounded-2xl.border.bg-card.shadow-xs:has(svg.lucide-activity) div.h-80 {
  height: auto !important;
  min-height: 18rem !important;
}

html:not([data-theme-preset]):not(:has([data-theme-preset])) :is(button, a, [role="button"]).bg-primary {
  color: #ffffff;
  border-color: transparent;
  background-color: transparent;
  background-image: linear-gradient(120deg, #06b6d4 0%, #6366f1 52%, #8b5cf6 100%);
}

html:not([data-theme-preset]):not(:has([data-theme-preset])) :is(button, a, [role="button"]).bg-primary:hover:not(:disabled) {
  filter: brightness(1.04);
}
