:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #151a2d;
  --muted: #8b92a3;
  --line: #ebeef5;
  --purple: #8b5cf6;
  --purple-soft: #efe6ff;
  --purple-head: #c7bbff;
  --blue: #2563eb;
  --green: #20c653;
  --orange: #f8b426;
  --red: #ef4444;
  --shadow: 0 10px 28px rgba(41, 48, 66, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(240deg, rgba(32, 198, 83, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef2f8 100%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 72%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4px;
  min-height: 100vh;
  padding: 20px;
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.logo-card,
.menu-card,
.topbar,
.announcement,
.car-panel {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(33, 45, 76, 0.1);
  backdrop-filter: blur(14px);
}

.logo-card {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 244, 255, 0.82));
}

.logo-mark {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(135deg, #00c2ff, #985cff, #22c55e);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.menu-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 16px;
}

.profile-menu-item {
  margin-top: auto;
  border: 1px solid transparent;
}

.menu-item {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #969dad;
  background: transparent;
  font-weight: 700;
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.menu-item + .menu-item {
  margin-top: 10px;
}

.menu-item.active {
  color: var(--purple);
  background: linear-gradient(135deg, #f4ebff, #ecf7ff);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.18), 0 10px 22px rgba(139, 92, 246, 0.12);
}

.menu-item:hover {
  transform: translateX(3px);
  background: rgba(239, 246, 255, 0.82);
}

.menu-icon {
  position: relative;
  width: 24px;
  height: 24px;
  color: currentColor;
  flex: 0 0 auto;
}

.gemini-logo-icon,
.grok-logo-icon,
.gpt-logo-icon {
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(15, 23, 42, 0.16);
}

.gemini-logo-icon {
  background: linear-gradient(135deg, #7c3aed, #38bdf8 52%, #22c55e);
}

.gemini-logo-icon::before {
  content: "✦";
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
}

.grok-logo-icon {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.grok-logo-icon::before {
  content: "X";
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.gpt-logo-icon {
  background: radial-gradient(circle at 35% 30%, #7df7c1, #10a37f 55%, #056049);
}

.gpt-logo-icon::before {
  content: "AI";
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.image-icon::before {
  content: "▣";
  font-size: 22px;
}

.train-icon::before {
  content: "▤";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-size: 13px;
}

.redbook-icon::before {
  content: "文";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.user-icon::before {
  content: "⚙";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.coin-icon::before {
  content: "$";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px 0 20px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 24, 42, 0.94), rgba(35, 42, 68, 0.92)),
    #101827;
  color: #fff;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #8b5cf6, #ef4444);
  opacity: 0.88;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 14px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.pill.danger {
  color: #ff4545;
  border: 1px solid #ff4545;
}

.pill.success {
  color: #05bd37;
  border: 1px solid #05bd37;
}

.user-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  white-space: nowrap;
}

.user-strip strong {
  font-size: 15px;
  color: #fff;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fd8b91, #8b5cf6);
  color: #fff;
  font-weight: 800;
}

.announcement {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  justify-content: center;
  gap: 18px;
  padding: 0 136px 18px;
  min-height: 264px;
  margin-bottom: 4px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 250, 255, 0.74)),
    rgba(255, 255, 255, 0.82);
}

.notice-box {
  min-height: 246px;
  border-radius: 0 0 10px 10px;
  padding: 22px 30px;
  text-align: center;
  border: 1px solid rgba(226, 232, 240, 0.82);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(41, 48, 66, 0.08);
}

.notice-box h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.qr-box h2 {
  color: #07c160;
}

.service-box {
  background: #fffaf5;
}

.service-box h2 {
  color: #f97316;
}

.link-box h2 {
  color: var(--blue);
}

.qr-frame {
  position: relative;
  width: 126px;
  height: 126px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: inset 0 0 0 1px #ddd, 0 0 0 1px #eee, 0 12px 26px rgba(15, 23, 42, 0.12);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qr-frame img:not([hidden]) + .qr-placeholder {
  display: none;
}

.qr-placeholder {
  position: absolute;
  inset: 0;
  border: 8px solid #fff;
  background:
    linear-gradient(90deg, #111 8px, transparent 8px) 0 0 / 16px 16px,
    linear-gradient(#111 8px, transparent 8px) 0 0 / 16px 16px,
    #fff;
  box-shadow: inset 0 0 0 1px #ddd;
}

.qr-placeholder span {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 7px solid #111;
}

.qr-placeholder span:nth-child(1) {
  left: 8px;
  top: 8px;
}

.qr-placeholder span:nth-child(2) {
  right: 8px;
  top: 8px;
}

.qr-placeholder span:nth-child(3) {
  left: 8px;
  bottom: 8px;
}

.qr-box h3 {
  margin: 0 0 20px;
  color: #e11928;
  font-size: 24px;
  text-shadow: 0 8px 22px rgba(225, 25, 40, 0.12);
}

.qr-box p,
.link-box p {
  margin: 0;
  color: #9198a7;
  font-size: 13px;
}

.service-text {
  text-align: left;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.8;
}

.service-text p {
  margin: 8px 0;
}

mark {
  padding: 2px 4px;
  color: #e11928;
  background: #fee2e2;
  font-weight: 800;
}

.link-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.link-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 270px;
  height: 58px;
  margin: 22px 0 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.link-box code {
  color: #8f95a3;
}

.link-box strong {
  margin-top: auto;
  color: var(--blue);
}

.car-panel {
  min-height: calc(100vh - 374px);
  padding: 30px 20px 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
    #fff;
  position: relative;
  overflow: hidden;
}

.car-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), transparent 18%, transparent 82%, rgba(56, 189, 248, 0.08));
}

.proxy-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
  padding: 16px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.proxy-panel div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #606879;
}

.proxy-panel strong {
  color: var(--text);
}

.proxy-actions {
  display: flex;
  gap: 10px;
}

.proxy-actions select,
.proxy-actions button {
  height: 36px;
  border: 1px solid #e3e7f0;
  border-radius: 9px;
  background: #fff;
  padding: 0 12px;
}

.panel-tools {
  display: grid;
  grid-template-columns: minmax(260px, 450px) auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.search {
  display: flex;
  align-items: center;
  height: 44px;
  border-radius: 999px;
  background: #f2f3f5;
  overflow: hidden;
}

.search span {
  order: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 4px;
  border-radius: 50%;
  color: var(--purple);
  background: #fff;
  font-size: 24px;
}

.search input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

.refresh {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e8f0;
  border-radius: 50%;
  color: #222842;
  background: #fff;
  font-size: 26px;
}

.view-tabs {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--purple);
}

.view-tabs button {
  border: 0;
  background: transparent;
  color: #b8bdc9;
}

.view-tabs button.active {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 8px;
}

.view-tabs span {
  width: 18px;
  height: 12px;
  border-radius: 4px 4px 0 0;
  background: currentColor;
  box-shadow: 0 10px 0 currentColor;
}

.view-tabs i {
  width: 1px;
  height: 20px;
  background: #e3e6ee;
}

.view-icon {
  width: 18px;
  height: 18px;
}

.view-icon::before {
  content: "";
  display: block;
  width: 18px;
  height: 12px;
  background: currentColor;
  border-radius: 3px;
}

.view-icon.square::before {
  width: 14px;
  height: 14px;
  opacity: 0.25;
}

.car-group + .car-group {
  margin-top: 38px;
}

.car-group h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  color: #171b31;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(33, 45, 76, 0.08);
  font-size: 20px;
  backdrop-filter: blur(10px);
}

.car-group h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.8);
}

.car-group h2 span {
  min-width: 28px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  font-size: 13px;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 20px;
}

.car-card {
  position: relative;
  height: 118px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 18px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.92));
  overflow: hidden;
  text-align: left;
  box-shadow: 0 12px 30px rgba(41, 48, 66, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.car-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 34%, rgba(255, 255, 255, 0.45) 48%, transparent 62% 100%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.car-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #8b5cf6);
  opacity: 0.7;
}

.car-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.58);
  box-shadow: 0 18px 42px rgba(104, 91, 199, 0.2), 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.car-card:hover::before {
  transform: translateX(120%);
}

.car-card.locked,
.car-card.disabled {
  opacity: 0.72;
}

.car-card.disabled .car-head {
  filter: grayscale(0.5);
}

.car-head {
  height: 50px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background:
    radial-gradient(circle at 18% 40%, rgba(255, 255, 255, 0.65), transparent 24%),
    linear-gradient(135deg, rgba(199, 187, 255, 0.96), rgba(168, 143, 255, 0.88));
}

.spark {
  color: #1f2440;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.65));
}

.spark::before {
  content: "✦";
  font-size: 32px;
}

.dot-pair {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dot-pair i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #14e95f;
  box-shadow: 0 0 10px rgba(20, 233, 95, 0.85), 0 0 20px rgba(20, 233, 95, 0.34);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.dot-pair i:nth-child(2) {
  animation-delay: 0.25s;
}

.tier {
  min-width: 54px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 16px rgba(15, 23, 42, 0.14);
}

.tier.ultra {
  background: linear-gradient(135deg, #f4b740, #c99028);
}

.tier.pro {
  background: linear-gradient(135deg, #8b5cf6, #6d4df2);
}

.tier.grok {
  background: #111827;
}

.tier.gpt {
  background: #10a37f;
}

.car-body {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 11px;
  color: #2b3148;
  font-size: 15px;
  font-weight: 700;
}

.car-body em {
  font-style: normal;
  color: #647084;
  font-weight: 600;
}

.progress {
  height: 6px;
  margin: 0 16px;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.72);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress .green {
  background: linear-gradient(90deg, #16c45b, #5eea8d);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.progress .orange {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.progress .red {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  border-radius: 10px;
  color: #fff;
  background: #151a2d;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hidden {
  display: none !important;
}

.image-page {
  min-height: calc(100vh - 40px);
  border-radius: 22px;
  overflow: hidden;
  color: #ececf3;
  background: #0b0c10;
}

.xhs-page {
  min-height: calc(100vh - 40px);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.xhs-page iframe {
  width: 100%;
  height: calc(100vh - 40px);
  min-height: calc(100vh - 40px);
  border: 0;
  background: #fff;
}

.promo-page {
  min-height: calc(100vh - 126px);
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.promo-header h2 {
  margin: 0 0 6px;
}

.promo-header p,
.promo-card p {
  margin: 0;
  color: #8b92a3;
  line-height: 1.65;
}

.promo-header strong {
  min-width: 120px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  text-align: center;
}

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

.promo-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  background: #fff;
}

.promo-card h3 {
  margin: 0;
}

.promo-action-row {
  display: flex;
  gap: 10px;
}

.promo-action-row input {
  flex: 1;
  min-width: 0;
}

.promo-action-row input,
.promo-card button {
  height: 40px;
  border-radius: 8px;
  font: inherit;
}

.promo-action-row input {
  border: 1px solid #e3e7f0;
  padding: 0 12px;
  outline: 0;
}

.promo-card button {
  border: 0;
  padding: 0 16px;
  color: #fff;
  background: var(--purple);
  font-weight: 800;
}

.promo-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #5b6374;
}

.promo-redeem-card button {
  background: #05bd37;
}

.promo-log-card {
  min-height: 180px;
}

.promo-log {
  white-space: pre-wrap;
  color: #5b6374;
  line-height: 1.8;
}

.image-nav {
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid #1d2029;
  background: #11131a;
}

.image-brand,
.image-tabs,
.image-usage {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-button,
.image-tabs button {
  border: 0;
  color: #d8d9e3;
  background: transparent;
}

.back-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 30px;
}

.sun-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #11131a;
  background: #b7ff4a;
}

.image-tabs button {
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
}

.image-tabs button.active {
  color: #11131a;
  background: #b7ff4a;
}

.image-usage {
  justify-content: flex-end;
  color: #a8adba;
  font-size: 13px;
}

.image-usage i {
  width: 1px;
  height: 14px;
  background: #363a46;
}

.image-workbench {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 108px);
}

.image-core {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(420px, 1fr);
  gap: 10px;
  padding: 10px;
  align-items: start;
}

.core-card {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #303442;
  border-radius: 6px;
  padding: 10px;
  background: #11141b;
}

.core-movie {
  grid-column: 2;
  grid-row: 1;
}

.core-config {
  grid-column: 1 / -1;
}

.core-card h3 {
  margin: 0;
  font-size: 16px;
}

.core-card textarea,
.core-card input {
  width: 100%;
  border: 1px solid #2d3342;
  border-radius: 4px;
  outline: 0;
  padding: 8px 10px;
  color: #ececf3;
  background: #0f1118;
}

.core-card input {
  height: 34px;
}

.core-card label {
  display: grid;
  gap: 5px;
  color: #a8adba;
}

.core-upload {
  min-height: 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
  text-align: center;
  padding: 8px 12px;
  border-radius: 4px;
}

.core-upload span,
.core-upload small {
  display: inline;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-field {
  display: grid;
  grid-template-columns: auto 96px 1fr;
  align-items: center;
  gap: 10px;
  color: #a8adba;
}

.inline-field small {
  color: #a8adba;
  white-space: nowrap;
}

.danger-generate {
  background: #e60012;
}

.image-launcher {
  min-height: calc(100vh - 108px);
  display: grid;
  place-items: center;
  padding: 32px;
}

.launcher-panel {
  width: min(680px, 100%);
  display: grid;
  gap: 18px;
  padding: 34px;
  border: 1px solid #252936;
  border-radius: 16px;
  background: #151820;
}

.launcher-badge {
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  color: #11131a;
  background: #b7ff4a;
  font-weight: 900;
}

.launcher-panel h2 {
  margin: 0;
  font-size: 28px;
}

.launcher-panel p {
  margin: 0;
  color: #a8adba;
  line-height: 1.7;
}

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

.api-config-toggle {
  justify-self: start;
  border: 1px solid #2d3342;
  border-radius: 4px;
  padding: 8px 12px;
  color: #b7ff4a;
  background: #0f1118;
}

.api-config-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #2d3342;
  border-radius: 4px;
  padding: 8px;
  background: #0f1118;
}

.api-key-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.api-key-grid label {
  display: grid;
  gap: 8px;
  color: #a8adba;
  font-size: 13px;
}

.api-key-grid input {
  height: 34px;
  border: 1px solid #2d3342;
  border-radius: 4px;
  outline: 0;
  padding: 0 12px;
  color: #ececf3;
  background: #090b11;
}

.image-form-grid label {
  display: grid;
  gap: 5px;
  color: #a8adba;
  font-size: 13px;
}

.image-form-grid select {
  height: 36px;
  border: 1px solid #2d3342;
  border-radius: 4px;
  color: #ececf3;
  background: #0f1118;
  padding: 0 12px;
}

.launcher-panel textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid #2d3342;
  border-radius: 12px;
  outline: 0;
  padding: 14px;
  color: #ececf3;
  background: #0f1118;
}

.image-settings {
  padding: 18px;
  border-right: 1px solid #1d2029;
  overflow: auto;
}

.iv-block {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #242834;
  border-radius: 14px;
  background: #151821;
}

.iv-block h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.iv-block p,
.iv-block em,
.hint {
  color: #8d94a4;
  font-style: normal;
  font-size: 12px;
}

.model-button,
.ratio-grid button,
.quality-list button,
.preset-item {
  width: 100%;
  border: 1px solid #2a2f3d;
  border-radius: 12px;
  color: #dfe2eb;
  background: #10131a;
}

.model-button {
  display: flex;
  justify-content: space-between;
  height: 42px;
  align-items: center;
  padding: 0 12px;
}

.model-button + p {
  margin-top: 14px;
}

.model-button.active,
.ratio-grid button.active,
.quality-list button.active {
  border-color: #b7ff4a;
  color: #b7ff4a;
}

.model-button span {
  color: #11131a;
  background: #b7ff4a;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ratio-grid button {
  height: 64px;
}

.quality-list {
  display: grid;
  gap: 10px;
}

.quality-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
}

.quality-list small {
  color: #858b99;
}

.upload-add {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px dashed #343948;
  border-radius: 14px;
  color: #a7adba;
}

.upload-add span {
  font-size: 24px;
}

.upload-add.core-upload {
  width: 100%;
  height: auto;
  min-height: 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
}

.upload-add.core-upload span {
  font-size: 14px;
}

.upload-add.core-upload small {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-group + .preset-group {
  margin-top: 14px;
}

.preset-group strong {
  display: block;
  margin-bottom: 8px;
  color: #b7ff4a;
}

.preset-item {
  margin-bottom: 8px;
  padding: 10px;
  text-align: left;
  line-height: 1.5;
}

.image-canvas {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 18px;
}

.prompt-card {
  border: 1px solid #242834;
  border-radius: 16px;
  background: #151821;
  overflow: hidden;
}

.prompt-card textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 18px;
  color: #eef0f6;
  background: transparent;
}

.prompt-card div {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-top: 1px solid #242834;
}

.text-button,
.generate-button {
  height: 40px;
  border: 0;
  border-radius: 11px;
  padding: 0 16px;
}

.text-button {
  color: #cbd0dc;
  background: transparent;
}

.generate-button {
  color: #11131a;
  background: #b7ff4a;
  font-weight: 800;
}

.canvas-empty,
.history-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 420px;
  border: 1px solid #242834;
  border-radius: 18px;
  color: #8c93a3;
  background: #10131a;
  text-align: center;
}

.canvas-empty div,
.history-empty div {
  font-size: 48px;
  margin-bottom: 10px;
}

.canvas-empty h3 {
  margin: 0 0 8px;
  color: #e7e9f2;
}

.image-history {
  min-height: calc(100vh - 108px);
  padding: 18px;
}

.user-center {
  min-height: calc(100vh - 126px);
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.user-header h2 {
  margin: 0 0 6px;
}

.user-header p,
.muted {
  margin: 0;
  color: #8b92a3;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.user-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid #eef1f6;
  overflow-x: auto;
}

.user-tabs button {
  height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #7b8496;
  background: transparent;
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
}

.user-tabs button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.member-card {
  padding: 18px;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  background: #fff;
}

.member-card + .member-card {
  margin-top: 16px;
}

.member-card h3 {
  margin: 0 0 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
}

.info-row span {
  color: #8b92a3;
}

.redeem-row,
.admin-tools,
.auth-actions,
.cookie-tools {
  display: flex;
  gap: 10px;
}

.redeem-row input,
.admin-tools input,
.admin-tools select,
.auth-body input,
.cookie-tools select,
.cookie-tools input {
  height: 40px;
  border: 1px solid #e3e7f0;
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
}

.cookie-tools {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-tools {
  flex-wrap: wrap;
}

.mall-tools {
  margin-bottom: 14px;
}

.mall-tools input {
  min-width: min(260px, 100%);
  flex: 1 1 260px;
}

.manual-card-tools {
  margin-top: 10px;
}

.manual-card-tools input {
  min-width: min(360px, 100%);
  flex: 1;
}

.proxy-admin-box {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  background: #fafbff;
}

.proxy-admin-box h3 {
  margin: 0;
}

.proxy-admin-toolbar,
.proxy-node-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 10px;
  align-items: center;
}

.proxy-node-row {
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.proxy-node-rows {
  display: grid;
  gap: 10px;
}

.proxy-admin-toolbar select,
.proxy-admin-toolbar button,
.proxy-node-row input,
.proxy-node-row button {
  height: 38px;
  border-radius: 8px;
  font: inherit;
}

.proxy-admin-toolbar select,
.proxy-node-row input {
  min-width: 0;
  border: 1px solid #e3e7f0;
  padding: 0 12px;
  background: #fff;
  outline: 0;
}

.proxy-admin-toolbar button,
.proxy-node-row button {
  border: 0;
  padding: 0 14px;
  color: #fff;
  background: var(--purple);
  font-weight: 800;
}

.proxy-node-row button {
  background: #ef4444;
}

.cookie-input {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid #e3e7f0;
  border-radius: 10px;
  padding: 12px;
  outline: 0;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.redeem-row input {
  flex: 1;
}

.redeem-row button,
.admin-tools button,
.auth-actions button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--purple);
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  font-size: 14px;
}

th {
  color: #5b6374;
  background: #f7f8fb;
}

.new-cards {
  white-space: pre-wrap;
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  color: #2563eb;
  background: #eef4ff;
  font-family: Consolas, monospace;
}

.auth-dialog,
.notice-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow);
}

.auth-dialog::backdrop,
.notice-dialog::backdrop {
  background: rgba(16, 25, 40, 0.45);
}

.auth-body {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.notice-dialog {
  width: min(934px, calc(100vw - 32px));
}

.notice-body {
  padding: 82px 46px 24px;
}

.notice-body h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 42px;
  color: #1f2937;
  font-size: 40px;
  letter-spacing: 0;
}

.notice-megaphone {
  font-size: 34px;
}

.notice-service-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(300px, 360px);
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  margin: 0 auto 40px;
}

.notice-service-grid .notice-box,
.notice-service-grid .customer-service-card {
  width: 100%;
  min-height: 0;
  margin: 0;
}

.service-qr-box {
  border-radius: 10px;
}

.notice-picture-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 88px;
}

.notice-picture-item {
  display: grid;
  place-items: center;
  align-content: start;
  text-align: center;
}

.notice-picture-item div {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 12px;
  border-radius: 16px;
  font-size: 54px;
  background: #fff;
}

.notice-picture-item strong {
  color: #374151;
  font-size: 18px;
  line-height: 1.35;
}

.notice-picture-item p {
  margin: 0;
  color: #374151;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.customer-service-card {
  width: min(360px, 100%);
  margin: 0 auto 40px;
  padding: 28px 34px;
  background: #fffaf5;
  box-shadow: 0 8px 22px rgba(41, 48, 66, 0.06);
  text-align: left;
}

.customer-service-card h2 {
  margin: 0 0 18px;
  color: #f97316;
  text-align: center;
  font-size: 28px;
}

.customer-service-card .service-text {
  font-size: 17px;
  line-height: 1.8;
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.notice-actions button {
  height: 34px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-weight: 700;
}

.notice-actions button:last-child {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
}

.auth-body h3 {
  margin: 0;
}

.auth-body p {
  margin: 0;
  color: #8b92a3;
  font-size: 13px;
}

.icon-button.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f3f5f9;
}

@media (max-width: 1400px) {
  .announcement {
    padding-inline: 28px;
  }

  .car-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }
}

@media (max-width: 980px) {
  .notice-service-grid {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    display: block;
  }

  .menu-card {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 8px;
  }

  .menu-item {
    width: auto;
    min-width: 132px;
  }

  .profile-menu-item {
    width: auto;
    min-height: 44px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .topbar,
  .announcement,
  .panel-tools,
  .proxy-panel,
  .promo-grid,
  .image-core,
  .image-form-grid,
  .api-key-grid,
  .image-nav,
  .image-workbench {
    grid-template-columns: 1fr;
  }

  .core-movie,
  .core-config {
    grid-column: auto;
    grid-row: auto;
  }

  .inline-field {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .announcement {
    padding: 14px;
  }

  .view-tabs {
    justify-self: start;
  }

  .proxy-panel,
  .proxy-actions,
  .promo-action-row,
  .proxy-admin-toolbar,
  .proxy-node-row,
  .image-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .image-nav {
    height: auto;
    gap: 12px;
    padding: 14px;
  }

  .car-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 560px) {
  .user-strip {
    flex-wrap: wrap;
    gap: 10px;
  }

  .announcement,
  .car-grid {
    grid-template-columns: 1fr;
  }
}
