﻿:root {
  --bg: #07080c;
  --bg-2: #0d1016;
  --panel: #12151c;
  --panel-2: #181c25;
  --panel-3: #1d2230;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(0, 216, 232, 0.42);
  --text: #f4fbff;
  --muted: #8d9aa6;
  --dim: #5e6a76;
  --cyan: #00d8e8;
  --cyan-2: #16f1db;
  --gold: #f7b500;
  --green: #1bd68f;
  --red: #ff5f6d;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 216, 232, 0.16), transparent 28rem),
    radial-gradient(circle at 55% 82%, rgba(109, 92, 255, 0.12), transparent 28rem),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 216, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 216, 232, 0.035) 1px, transparent 1px);
  background-size: 4.2rem 4.2rem;
  mask-image: radial-gradient(circle at 68% 52%, black 0%, transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none;
  animation: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  height: 100vh; overflow: hidden;
  position: relative;
  z-index: 1;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(15, 18, 25, 0.98), rgba(10, 12, 17, 0.98));
  border-right: 1px solid var(--line);
  height: 100vh;
  position: relative;
}

.sidebar-head {
  display: grid;
  grid-template-columns: 1fr 2rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem 0.6rem;
}

.brand {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid rgba(212, 255, 255, 0.86);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(0, 216, 232, 0.4);
  animation: brandPulse 3.6s ease-in-out infinite;
}

.brand-name {
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.12rem;
}

.collapse-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.45rem;
  transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.collapse-btn:hover {
  color: var(--cyan);
  border-color: rgba(0, 216, 232, 0.38);
  transform: translateX(-2px);
}

.primary-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
}

body.hide-primary-tabs .primary-tabs {
  display: none;
}

.primary-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0.7rem;
  padding: 0.45rem 0.2rem;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  font-size: 0.72rem;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.primary-tab:hover {
  transform: translateY(-2px);
}

.primary-tab.active {
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 216, 232, 0.17), rgba(0, 216, 232, 0.06));
}

.primary-tab:nth-child(2).active {
  color: #b06cff;
  background: rgba(130, 80, 255, 0.18);
}

.primary-tab:nth-child(3).active {
  color: var(--gold);
  background: rgba(247, 181, 0, 0.14);
}

.tab-icon {
  font-size: 1.28rem;
}

.model-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.3rem;
  margin: 0.25rem 0.75rem 0.4rem;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0.75rem;
  padding: 0.25rem;
}

.model-tab {
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--muted);
  padding: 0.38rem 0.45rem; white-space: nowrap; font-size: 0.72rem;
  font-size: 0.78rem;
  cursor: pointer;
  min-width: 0;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.model-tab[hidden],
.model-tab[data-type="mine"] {
  display: none !important;
}

.model-tab:hover {
  transform: translateY(-1px);
}

.model-tab.active {
  background: var(--cyan);
  color: #001114;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.75rem 0.5rem;
  height: 2.15rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(247,181,0,0.45);
  border-radius: 0.65rem;
  color: var(--gold);
  background: rgba(247,181,0,0.06);
}

.search-label {
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  min-width: 2.6rem;
  justify-content: center;
}

.search-box:focus-within {
  border-color: rgba(0,216,232,0.72);
  background: rgba(0,216,232,0.06);
  box-shadow: 0 0 18px rgba(0,216,232,0.16);
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 0.82rem;
}

.model-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0 0.5rem 0.8rem 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.model-card {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.48rem;
  align-items: center;
  padding: 0.72rem 0.44rem;
  border-radius: 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  opacity: 0;
  transform: translateX(-0.5rem);
  animation: listIn 0.42s ease forwards;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.model-card:nth-child(2) {
  animation-delay: 0.03s;
}

.model-card:nth-child(3) {
  animation-delay: 0.06s;
}

.model-card:nth-child(4) {
  animation-delay: 0.09s;
}

.model-card:nth-child(5) {
  animation-delay: 0.12s;
}

.model-card:nth-child(6) {
  animation-delay: 0.15s;
}

.model-card:hover {
  transform: translateX(0.16rem);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.model-card.active {
  background: linear-gradient(90deg, rgba(0, 216, 232, 0.22), rgba(0, 216, 232, 0.06));
  border-color: rgba(0, 216, 232, 0.2);
  box-shadow: inset 0 0 28px rgba(0, 216, 232, 0.08);
}

.model-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 0.18rem;
  border-radius: 1rem;
  background: var(--cyan);
}

.model-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 1.2rem;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.model-card:hover .model-icon,
.model-card.active .model-icon {
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(0, 216, 232, 0.24),
    0 0 22px rgba(0, 216, 232, 0.16);
}

.model-copy {
  min-width: 0;
  overflow: hidden;
}

.model-name {
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-desc {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 0.18rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  align-self: start;
  color: #07110e;
  background: var(--green);
  border-radius: 0.35rem;
  padding: 0.13rem 0.35rem;
  font-size: 0.66rem;
  font-weight: 900;
  animation: scoreGlow 2.8s ease-in-out infinite;
}

.score.warn {
  background: var(--gold);
}

.score.bad {
  background: var(--red);
  color: #fff;
}

.user-panel {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.72rem 0.75rem;
  border-top: 1px solid var(--line);
  background: rgba(12, 14, 20, 0.96);
}

.avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 216, 232, 0.15)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=160&q=80")
      center / cover;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
}

.user-meta {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
}

.user-meta strong {
  color: #171422;
  font-size: 0.94rem;
}

.user-meta span {
  color: #6f6a7c;
  font-size: 0.72rem;
}

.user-meta i {
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 0.25rem;
}

.recharge-btn {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  border: 1px solid rgba(255, 174, 0, 0.65);
  background: linear-gradient(135deg, rgba(85, 51, 12, 0.82), rgba(120, 37, 35, 0.76));
  color: #ffd03b;
  border-radius: 0.85rem;
  padding: 0.46rem 0.75rem;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.recharge-btn span {
  white-space: nowrap;
  font-size: 0.82rem;
}

.recharge-btn em {
  min-width: 3.1rem;
  border-radius: 999px;
  background: #ff4f4f;
  color: #fff;
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1.45;
}

.recharge-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(247, 181, 0, 0.22);
}

.sidebar-footer-btns {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
  margin-top: 0.15rem;
}

.sidebar-footer-btns .recharge-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 0;
  padding: 0.34rem 0.3rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

.sidebar-footer-btns .recharge-btn span {
  font-size: 0.7rem;
  line-height: 1.2;
}

.sidebar-footer-btns .recharge-btn em {
  min-width: 0;
  padding: 0.08rem 0.42rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.25;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer-btns .apikey-btn {
  border-color: rgba(0, 216, 232, 0.35);
  background: rgba(0, 216, 232, 0.08);
}

.sidebar-footer-btns .apikey-btn em {
  color: rgba(0, 216, 232, 0.85);
  background: rgba(0, 216, 232, 0.14);
}

.sidebar-footer-btns .recharge-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-footer-btns .apikey-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 216, 232, 0.18);
}

.sidebar-footer-btns .logout-btn {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
  color: #b4232f;
}

.sidebar-footer-btns .logout-btn em {
  color: #b4232f;
  background: rgba(239, 68, 68, 0.12);
}

.sidebar-footer-btns .logout-btn:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.14);
}

.workspace {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1.2rem;
}

.top-actions {
  position: absolute;
  inset: 1.4rem 1.4rem auto 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 5;
  pointer-events: none;
}

.top-actions button,
.floating-actions button {
  pointer-events: auto;
}

.task-btn {
  border: 0;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #ffd22f, #ff9f0a);
  color: #161000;
  font-weight: 900;
  padding: 0.68rem 1.4rem;
  box-shadow: 0 0 28px rgba(255, 190, 19, 0.42);
  cursor: pointer;
  animation: goldBreath 2.6s ease-in-out infinite;
}

.tip-btn {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 1px solid rgba(247, 181, 0, 0.38);
  background: rgba(247, 181, 0, 0.1);
  color: var(--gold);
  cursor: pointer;
}

.grid-btn {
  margin-left: auto;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 26, 35, 0.78);
  display: grid;
  grid-template-columns: repeat(2, 0.55rem);
  place-content: center;
  gap: 0.23rem;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(0, 216, 232, 0.2);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.grid-btn::after {
  content: "";
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  right: 0.22rem;
  top: 0.22rem;
  background: #ff465c;
  box-shadow: 0 0 0 0 rgba(255, 70, 92, 0.55);
  animation: notifyPing 1.8s ease-out infinite;
}

.grid-btn:hover {
  transform: rotate(10deg) scale(1.04);
  box-shadow: 0 0 34px rgba(0, 216, 232, 0.34);
}

.grid-btn span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 0.15rem;
  background: var(--cyan);
}

.grid-btn span:nth-child(2) {
  background: var(--gold);
}

.grid-btn span:nth-child(3) {
  background: #895cff;
}

.grid-btn span:nth-child(4) {
  background: var(--green);
}

.hero-panel {
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 4.6rem 1rem 1rem;
}

.model-hero {
  width: min(42rem, 80%);
  text-align: center;
  animation: heroIn 0.5s ease both;
}

.hero-icon {
  width: 5.9rem;
  height: 5.9rem;
  border-radius: 2rem;
  margin: 0 auto 2.2rem;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(0, 216, 232, 0.1));
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.18);
  font-size: 2.8rem;
  animation: floatIcon 4.8s ease-in-out infinite;
}

.hero-card {
  border: 1px solid var(--line-strong);
  background: rgba(18, 21, 28, 0.82);
  border-radius: 0.75rem;
  padding: 1.2rem 1.35rem;
  text-align: left;
  color: var(--text);
  line-height: 1.65;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(0, 216, 232, 0.12), transparent);
  transform: translateX(-120%);
  animation: cardShine 5s ease-in-out infinite;
}

.work-panel {
  align-self: end;
  display: grid;
  justify-items: center;
  padding-bottom: 0.65rem;
}

.composer {
  width: min(58rem, 86vw);
  border-radius: 1.05rem;
  background: rgba(24, 28, 37, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  animation: composerIn 0.42s ease both;
}

.composer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 216, 232, 0.16), transparent);
  transform: translateX(-100%);
  animation: inputGlowSweep 4.8s ease-in-out infinite;
}

.asset-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem 0.25rem;
}

.asset-pill {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 216, 232, 0.28), rgba(255, 255, 255, 0.06));
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.asset-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 216, 232, 0.34);
}

.asset-add {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--muted);
  background: transparent;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
}

.composer textarea {
  width: 100%;
  min-height: 5.2rem;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0.8rem 1rem;
}

.composer textarea::placeholder {
  color: #727d8b;
}

.composer-footer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem 0.82rem;
}

.select-chip,
.cost-chip {
  border: 0;
  border-radius: 0.45rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.78rem;
}

.cost-chip {
  margin-left: auto;
  color: #ffd56c;
}

.send-btn {
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  color: #001114;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 216, 232, 0.42);
}

.chat-demo {
  width: min(56rem, 86vw);
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.chat-bubble {
  max-width: 68%;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe9f1;
  animation: bubbleIn 0.4s ease both;
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(0, 216, 232, 0.16);
}

.image-grid,
.works-grid {
  width: min(58rem, 86vw);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.image-tile,
.work-tile {
  border-radius: 0.9rem;
  min-height: 8rem;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)),
    var(--img) center / cover;
  border: 1px solid var(--line);
  display: flex;
  align-items: end;
  padding: 0.7rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.image-tile:hover,
.work-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 216, 232, 0.38);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.video-preview {
  width: min(42rem, 72vw);
  aspect-ratio: 16 / 9;
  border-radius: 1.2rem;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.66)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=1200&q=80")
      center / cover;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: heroIn 0.5s ease both;
}

.video-preview::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: cardShine 4.5s ease-in-out infinite;
}

.play-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(0, 216, 232, 0.86);
  color: #001114;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
}

.floating-actions {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  display: grid;
  gap: 0.55rem;
  z-index: 8;
}

.floating-actions button {
  border: 1px solid var(--line);
  background: rgba(18, 21, 28, 0.82);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 1rem;
  animation: fadeIn 0.18s ease both;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(42rem, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 1.1rem;
  background: #141821;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  padding: 1.3rem;
  animation: modalIn 0.24s ease both;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.modal h2 {
  margin: 0 0 0.9rem;
}

.modal:has(.recharge-modal) {
  width: min(64rem, 94vw);
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(98, 43, 226, 0.12);
  box-shadow: 0 28px 80px rgba(45, 28, 90, 0.18);
}

.modal:has(.recharge-modal) .modal-close {
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-color: rgba(98, 43, 226, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #4f4664;
  font-size: 0;
  box-shadow: 0 10px 26px rgba(45, 28, 90, 0.08);
}

.modal:has(.recharge-modal) .modal-close::before,
.modal:has(.recharge-modal) .modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.9rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.modal:has(.recharge-modal) .modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal:has(.recharge-modal) .modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.recharge-modal {
  max-height: 90vh;
  overflow: auto;
  padding: 1.85rem 2rem 6.5rem;
  color: #171422;
  background:
    radial-gradient(circle at 12% 0%, rgba(109, 40, 242, 0.08), transparent 22rem),
    linear-gradient(180deg, #fff 0%, #fbfaff 100%);
}

.recharge-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding-right: 2.5rem;
}

.recharge-head h2 {
  margin: 0 0 0.35rem;
  color: #171422;
  font-size: 1.7rem;
  line-height: 1.15;
}

.recharge-head p {
  max-width: 38rem;
  margin: 0;
  color: #8a8398;
  line-height: 1.65;
}

.recharge-balance {
  min-width: 8.8rem;
  border: 1px solid rgba(109, 40, 242, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.75rem 0.9rem;
  text-align: right;
}

.recharge-balance span,
.recharge-summary span {
  display: block;
  color: #8a8398;
  font-size: 0.76rem;
  font-weight: 800;
}

.recharge-balance strong,
.recharge-summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #6d28f2;
  font-size: 1rem;
}

.pay-tabs {
  display: flex;
  gap: 1.6rem;
  margin-top: 1.85rem;
  border-bottom: 1px solid rgba(98, 43, 226, 0.1);
}

.pay-tabs button {
  height: 2.75rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #8a8398;
  font-weight: 950;
  cursor: pointer;
}

.pay-tabs button.active {
  color: #6d28f2;
  border-bottom-color: #6d28f2;
}

.recharge-panel {
  display: none;
}

.recharge-panel.active {
  display: block;
}

.promo-banner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(109, 40, 242, 0.18);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(109, 40, 242, 0.08), rgba(255, 59, 152, 0.06));
  color: #4f2bc8;
}

.promo-banner span {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  background: rgba(255, 91, 135, 0.18);
  color: #ff5b87;
  font-weight: 950;
}

.promo-banner strong,
.promo-banner p {
  margin: 0;
}

.promo-banner p {
  margin-top: 0.2rem;
  color: #7a7190;
  font-size: 0.82rem;
}

.recharge-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.45rem;
}

.recharge-title-row p {
  margin: 0.25rem 0 0;
  color: #8a8398;
  font-size: 0.82rem;
}

.recharge-title-row > span {
  color: #8a8398;
  font-size: 0.78rem;
  font-weight: 850;
}

.recharge-label {
  color: #6f6a7c;
  font-size: 0.86rem;
  font-weight: 950;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.recharge-plan {
  position: relative;
  min-height: 8.4rem;
  padding: 1rem 0.82rem 0.85rem;
  border: 1px solid rgba(98, 43, 226, 0.13);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.88);
  color: #171422;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(45, 28, 90, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.recharge-plan:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 40, 242, 0.34);
  box-shadow: 0 20px 44px rgba(45, 28, 90, 0.1);
}

.recharge-plan.active {
  border-color: rgba(109, 40, 242, 0.72);
  background: linear-gradient(180deg, rgba(109, 40, 242, 0.1), #fff 68%);
  box-shadow: 0 20px 48px rgba(109, 40, 242, 0.16);
}

.recharge-plan.active::after {
  content: "?";
  position: absolute;
  right: 0.72rem;
  bottom: 0.72rem;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #6d28f2;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
}

.recharge-plan.hot {
  border-color: rgba(109, 40, 242, 0.28);
}

.recharge-plan em,
.recharge-plan mark {
  position: absolute;
  top: -0.48rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  padding: 0.28rem 0.6rem;
}

.recharge-plan em {
  right: 0.55rem;
  background: linear-gradient(90deg, #8d4bff, #ff3b98);
}

.recharge-plan mark {
  left: 0.55rem;
  background: #171422;
}

.recharge-plan i {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.5rem;
  background: rgba(109, 40, 242, 0.1);
  color: #6d28f2;
  font-style: normal;
}

.recharge-plan strong {
  display: block;
  margin: 0.7rem 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(98, 43, 226, 0.09);
  text-align: center;
  color: #171422;
  font-size: 2rem;
  line-height: 1;
}

.recharge-plan small {
  margin-right: 0.28rem;
  color: #9aa3af;
  font-size: 0.86rem;
  font-weight: 700;
}

.recharge-plan span {
  display: flex;
  justify-content: space-between;
  color: #7a7190;
  font-size: 0.82rem;
}

.recharge-plan b {
  color: #6d28f2;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.pay-methods button {
  height: 4.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border: 1px solid rgba(98, 43, 226, 0.13);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.86);
  color: #171422;
  font-weight: 950;
  cursor: pointer;
}

.pay-methods button.active {
  border-color: rgba(109, 40, 242, 0.5);
  background: rgba(109, 40, 242, 0.08);
}

.pay-methods i {
  width: 1.05rem;
  height: 1.05rem;
  margin-left: auto;
  border-radius: 50%;
  border: 1px solid rgba(109, 40, 242, 0.24);
}

.pay-methods button.active i {
  border: 0;
  box-shadow: inset 0 0 0 0.32rem #fff;
  background: #6d28f2;
}

.wechat,
.alipay {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
}

.wechat {
  background: #18b981;
}

.alipay {
  background: #1677ff;
}

.code-recharge-card {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
  border: 1px solid rgba(98, 43, 226, 0.13);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.86);
  padding: 1.2rem;
}

.code-recharge-card h3,
.code-recharge-card p {
  margin: 0;
}

.code-recharge-card p {
  margin-top: 0.28rem;
  color: #8a8398;
}

.code-input-row {
  display: grid;
  gap: 0.5rem;
}

.code-input-row span {
  color: #6f6a7c;
  font-size: 0.82rem;
  font-weight: 900;
}

.code-input-row input {
  height: 3rem;
  border: 1px solid rgba(98, 43, 226, 0.16);
  border-radius: 0.65rem;
  background: #fff;
  color: #171422;
  padding: 0 0.9rem;
  outline: 0;
}

.code-input-row input:focus {
  border-color: #6d28f2;
  box-shadow: 0 0 0 3px rgba(109, 40, 242, 0.1);
}

.code-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.code-tips span {
  border-radius: 999px;
  background: rgba(109, 40, 242, 0.08);
  color: #6d28f2;
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 850;
}

.recharge-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 8rem minmax(13rem, 1.25fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1.8rem 1rem;
  border-top: 1px solid rgba(98, 43, 226, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), #fff 38%);
  box-shadow: 0 -18px 42px rgba(45, 28, 90, 0.08);
}

.recharge-actions button {
  height: 3.05rem;
  border-radius: 0.55rem;
  font-weight: 950;
  cursor: pointer;
}

.cancel-pay {
  border: 1px solid rgba(98, 43, 226, 0.12);
  background: #fff;
  color: #8a8398;
}

.confirm-pay {
  border: 0;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  box-shadow: 0 14px 34px rgba(109, 40, 242, 0.22);
}

.confirm-pay:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.plan:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 216, 232, 0.38);
  background: rgba(0, 216, 232, 0.06);
}

.plan strong {
  display: block;
  font-size: 1.4rem;
  color: var(--cyan);
  margin: 0.4rem 0;
}

.task-list {
  display: grid;
  gap: 0.65rem;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.status {
  color: var(--green);
  font-weight: 800;
}

@keyframes brandPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 216, 232, 0.34);
  }
  50% {
    box-shadow: 0 0 34px rgba(0, 216, 232, 0.62);
  }
}

@keyframes scanSweep {
  from {
    transform: translateX(-40%);
  }
  to {
    transform: translateX(40%);
  }
}

@keyframes listIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scoreGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

@keyframes goldBreath {
  0%,
  100% {
    box-shadow: 0 0 22px rgba(255, 190, 19, 0.38);
  }
  50% {
    box-shadow: 0 0 38px rgba(255, 190, 19, 0.58);
  }
}

@keyframes notifyPing {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 70, 92, 0.55);
  }
  80%,
  100% {
    box-shadow: 0 0 0 0.55rem rgba(255, 70, 92, 0);
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(0.55rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

@keyframes cardShine {
  0%,
  62% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes composerIn {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inputGlowSweep {
  0%,
  55% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(0.6rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-head {
    padding: 0.95rem 1rem 0.7rem;
  }

  .brand {
    grid-template-columns: 2.5rem 1fr;
  }

  .collapse-btn {
    display: none;
  }

  .primary-tabs {
    padding: 0.55rem 0.75rem;
  }

  .model-tabs {
    overflow-x: auto;
    margin-bottom: 0.65rem;
  }

  .model-tab {
    flex: 0 0 auto;
    min-width: 3.4rem;
  }

  .model-list {
    max-height: 18rem;
    display: grid;
    gap: 0.55rem;
  }

  .workspace {
    min-height: auto;
    padding: 0.9rem;
  }

  .hero-panel {
    min-height: auto;
    place-items: start center;
    padding: 0.7rem 0 1rem;
  }

  .work-panel {
    align-self: start;
    justify-items: stretch;
    padding-bottom: 1rem;
  }

  .image-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .user-panel {
    position: sticky;
    bottom: 0;
    z-index: 7;
  }

  .modal {
    width: min(42rem, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .modal:has(.recharge-modal) {
    width: min(58rem, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .recharge-modal {
    max-height: calc(100vh - 20px);
    padding: 1.25rem 1rem 5.8rem;
  }

  .pay-tabs {
    margin-top: 1.5rem;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recharge-plan {
    min-height: 7.9rem;
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .recharge-actions {
    padding: 0.8rem 1rem 1rem;
  }
}

@media (max-width: 520px) {
  .primary-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .primary-tab {
    font-size: 0.72rem;
  }

  .model-card {
    grid-template-columns: 2.4rem 1fr auto;
    padding: 0.68rem;
  }

  .model-desc {
    -webkit-line-clamp: 1;
  }

  .image-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .recharge-grid {
    gap: 0.65rem;
  }

  .recharge-plan strong {
    font-size: 1.65rem;
  }
}

@media (max-width: 760px) {
  .recharge-head {
    grid-template-columns: 1fr;
    padding-right: 2.75rem;
  }

  .recharge-balance {
    text-align: left;
  }

  .recharge-title-row,
  .code-tips {
    display: grid;
    align-items: start;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .recharge-actions {
    grid-template-columns: 1fr;
  }

  .recharge-summary {
    order: -1;
  }
}

/* Recharge modal - simple console style */
.modal:has(.simple-recharge-modal) {
  width: min(57.5rem, 94vw);
  max-height: 90vh;
  border-radius: 0.35rem;
  background: #f5f7fb;
}

.modal:has(.simple-recharge-modal) .modal-close {
  top: 1rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: #4b5563;
  box-shadow: none;
}

.simple-recharge-modal {
  max-height: 90vh;
  padding: 1.45rem 1.45rem 5.45rem;
  background: #f5f7fb;
}

.simple-recharge-modal .recharge-head {
  display: block;
  padding-right: 2.4rem;
}

.simple-recharge-modal .recharge-head h2 {
  margin-bottom: 0.35rem;
  color: #111827;
  font-size: 1.28rem;
}

.simple-recharge-modal .recharge-head p {
  color: #64748b;
  font-size: 0.9rem;
}

.simple-recharge-modal .pay-tabs {
  gap: 2rem;
  margin-top: 2.1rem;
  border-bottom: 1px solid #d6dce6;
}

.simple-recharge-modal .pay-tabs button {
  height: 2.45rem;
  color: #64748b;
  border-bottom-width: 3px;
  font-size: 0.95rem;
}

.simple-recharge-modal .pay-tabs button.active {
  color: #00a376;
  border-bottom-color: #00a376;
}

.simple-recharge-modal .recharge-label {
  margin: 1.45rem 0 0.8rem;
  color: #334155;
  font-size: 0.82rem;
}

.simple-recharge-modal .payment-label {
  margin-top: 1.65rem;
}

.simple-recharge-modal .recharge-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.35rem 0.75rem;
}

.simple-recharge-modal .recharge-plan {
  min-height: 8.8rem;
  border: 1px solid #d7dde7;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: none;
  padding: 0.8rem 0.68rem 0.75rem;
}

.simple-recharge-modal .recharge-plan:hover,
.simple-recharge-modal .recharge-plan.active {
  transform: none;
  border-color: #00a376;
  box-shadow: 0 0 0 1px rgba(0, 163, 118, 0.2);
}

.simple-recharge-modal .recharge-plan.active::after {
  display: none;
}

.simple-recharge-modal .recharge-plan i {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.35rem;
  background: #e7ebf1;
  color: #64748b;
  font-size: 0.82rem;
}

.simple-recharge-modal .recharge-plan strong {
  margin: 1rem 0 0.75rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid #d7dde7;
  color: #111827;
  font-size: 2rem;
}

.simple-recharge-modal .recharge-plan small {
  color: #475569;
  font-size: 0.82rem;
}

.simple-recharge-modal .recharge-plan span {
  color: #475569;
}

.simple-recharge-modal .recharge-plan b {
  color: #111827;
}

.simple-recharge-modal .pay-methods {
  gap: 0.65rem;
}

.simple-recharge-modal .pay-methods button {
  height: 3.9rem;
  border: 1px solid #d7dde7;
  border-radius: 0.45rem;
  background: #fff;
  color: #111827;
  box-shadow: none;
}

.simple-recharge-modal .pay-methods button.active {
  border-color: #d7dde7;
  background: #fff;
}

.simple-recharge-modal .pay-methods i {
  border-color: #cbd5e1;
}

.simple-recharge-modal .pay-methods button.active i {
  border: 1px solid #cbd5e1;
  background: radial-gradient(circle, #00a376 0 45%, transparent 48%);
  box-shadow: none;
}

.simple-recharge-modal .wechat {
  background: #00b26f;
}

.simple-recharge-modal .code-recharge-card {
  border-color: #d7dde7;
  background: #fff;
  box-shadow: none;
}

.simple-recharge-modal .recharge-actions {
  grid-template-columns: 1fr 1fr;
  padding: 1rem 1.45rem;
  border-top: 1px solid #d6dce6;
  background: #f5f7fb;
  box-shadow: none;
}

.simple-recharge-modal .recharge-actions button {
  height: 2.9rem;
  border-radius: 0.45rem;
}

.simple-recharge-modal .cancel-pay {
  border-color: #d7dde7;
  background: #f5f7fb;
  color: #64748b;
}

.simple-recharge-modal .confirm-pay {
  background: #7bc8b7;
  color: #fff;
  box-shadow: none;
}

.simple-recharge-modal .confirm-pay:not(:disabled) {
  background: #00a376;
}

.simple-recharge-modal .confirm-pay:disabled {
  opacity: 1;
  background: #7bc8b7;
}

.recharge-pay-panel {
  padding-bottom: 0.25rem;
}

.recharge-pay-panel .recharge-label {
  margin: 1rem 0 0.65rem;
}

.recharge-pay-panel .payment-label {
  margin-top: 1rem;
}

.recharge-pay-panel .recharge-grid {
  gap: 0.75rem;
}

.recharge-pay-panel .recharge-plan {
  min-height: 6.95rem;
  padding: 0.62rem 0.62rem 0.55rem;
}

.recharge-pay-panel .recharge-plan i {
  width: 1.35rem;
  height: 1.35rem;
}

.recharge-pay-panel .recharge-plan strong {
  margin: 0.55rem 0 0.5rem;
  padding-bottom: 0.58rem;
  font-size: 1.78rem;
}

.recharge-pay-panel .pay-methods {
  margin-top: 0.55rem;
  gap: 0.65rem;
}

.recharge-pay-panel .pay-methods button {
  height: 3.35rem;
}

.recharge-pay-panel .recharge-actions {
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.recharge-pay-panel .recharge-actions button {
  width: 100%;
}

/* SiliconFlow-like minimal purple theme */
:root {
  --bg: #f7f5ff;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f4f0ff;
  --panel-3: #eee8ff;
  --line: rgba(98, 43, 226, 0.12);
  --line-strong: rgba(98, 43, 226, 0.26);
  --text: #171422;
  --muted: #6f6a7c;
  --dim: #9b94ad;
  --cyan: #6d28f2;
  --cyan-2: #8b5cf6;
  --gold: #6d28f2;
  --green: #18b981;
  --red: #ef476f;
  --shadow: 0 20px 60px rgba(45, 28, 90, 0.1);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 78% 4%, rgba(109, 40, 242, 0.13), transparent 24rem),
    radial-gradient(circle at 10% 18%, rgba(139, 92, 246, 0.1), transparent 22rem),
    linear-gradient(180deg, #fbfaff 0%, #f4f0ff 100%);
}

body::before {
  background:
    linear-gradient(rgba(98, 43, 226, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 43, 226, 0.045) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: radial-gradient(circle at 58% 32%, black 0%, transparent 70%);
}

.bg-canvas {
  display: none;
}

.sidebar {
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid rgba(98, 43, 226, 0.12);
  box-shadow: 18px 0 50px rgba(45, 28, 90, 0.05);
  backdrop-filter: blur(16px);
}

.brand-mark,
.landing-logo {
  border-color: rgba(109, 40, 242, 0.35);
  color: #6d28f2;
  background: #fff;
  box-shadow: 0 8px 26px rgba(109, 40, 242, 0.14);
}

.brand-name,
.landing-brand {
  color: #5f24d8;
}

.brand-subtitle,
.model-desc,
.user-meta span,
.hero-head p,
.feature-card span,
.quick-title,
.composer textarea::placeholder {
  color: #777186;
}

.primary-tab,
.model-tab,
.collapse-btn,
.history-btn,
.floating-actions button {
  color: #6f6a7c;
}

#openWorks {
  display: none !important;
}

.primary-tab.active,
.model-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  box-shadow: 0 12px 30px rgba(109, 40, 242, 0.18);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.75rem 0.45rem;
  height: 2rem;
  padding: 0 0.62rem;
  border: 1px solid rgba(247,181,0,0.48);
  border-radius: 0.6rem;
  color: var(--gold);
  background: rgba(247,181,0,0.06);
}

.search-box > span,
.search-box .search-label {
  font-size: 0.8rem;
}

.search-box input {
  font-size: 0.8rem;
}

.model-card,
.feature-card,
.composer,
.hero-card,
.answer-card,
.modal,
.task-row,
.plan,
.quick-card,
.audio-panel,
.video-preview {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(98, 43, 226, 0.12);
  box-shadow: 0 16px 46px rgba(45, 28, 90, 0.08);
}

.model-card.active {
  background: linear-gradient(135deg, rgba(109, 40, 242, 0.12), rgba(255, 255, 255, 0.9));
  border-color: rgba(109, 40, 242, 0.26);
}

.model-icon,
.feature-icon,
.hero-icon,
.asset-pill {
  background: rgba(109, 40, 242, 0.1);
  color: #6d28f2;
}

.score,
.score.warn,
.score.bad {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.08);
  border-color: rgba(109, 40, 242, 0.18);
}

.task-btn,
.send-btn,
.solid-btn,
.start-btn,
.journey-primary,
.confirm-pay {
  color: #fff;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  box-shadow: 0 12px 30px rgba(109, 40, 242, 0.22);
}

.recharge-btn {
  border-color: rgba(109, 40, 242, 0.28);
  color: #fff;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
}

.recharge-btn em {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-footer-btns .recharge-btn {
  border-color: rgba(98, 43, 226, 0.16);
  background: rgba(109, 40, 242, 0.06);
  color: #5f24d8;
}

.sidebar-footer-btns .recharge-btn em {
  color: #6f6a7c;
  background: rgba(109, 40, 242, 0.1);
}

.sidebar-footer-btns .apikey-btn {
  border-color: rgba(109, 40, 242, 0.22);
  background: rgba(109, 40, 242, 0.08);
  color: #5f24d8;
}

.sidebar-footer-btns .apikey-btn em {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.12);
}

.sidebar-footer-btns .recharge-btn:hover {
  box-shadow: 0 4px 14px rgba(109, 40, 242, 0.14);
}

.user-panel {
  background: rgba(255, 255, 255, 0.92);
}

.select-chip,
.cost-chip,
.nav-chip,
.language-btn,
.journey-secondary {
  background: #fff;
  border: 1px solid rgba(98, 43, 226, 0.13);
  color: #4f4664;
}

.modal-backdrop {
  background: rgba(24, 18, 43, 0.36);
  backdrop-filter: blur(12px);
}

.modal:has(.recharge-modal),
.modal:has(.apikey-modal),
.recharge-actions {
  background: #fff;
}

.modal:has(.apikey-modal) {
  border: 1px solid rgba(98, 43, 226, 0.12);
  box-shadow: 0 24px 60px rgba(45, 28, 90, 0.12);
}

.apikey-head h2 {
  color: #171422;
}

.apikey-head p,
.apikey-empty,
.api-hint {
  color: #6f6a7c;
}

.apikey-create {
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 22px rgba(109, 40, 242, 0.22);
}

.apikey-form {
  border-color: rgba(98, 43, 226, 0.14);
  background: #faf8ff;
}

.apikey-field > span {
  color: #6f6a7c;
}

.apikey-field input {
  border-color: rgba(98, 43, 226, 0.18);
  background: #fff;
  color: #171422;
}

.apikey-field input::placeholder {
  color: #a8a2b8;
}

.apikey-cancel {
  border-color: rgba(98, 43, 226, 0.2);
  color: #6f6a7c;
}

.apikey-cancel:hover {
  color: #171422;
  border-color: rgba(98, 43, 226, 0.35);
}

.apikey-row {
  border-color: rgba(98, 43, 226, 0.12);
  background: #faf8ff;
}

.apikey-name {
  color: #171422;
}

.apikey-key {
  color: #777186;
}

.apikey-empty {
  border-color: rgba(98, 43, 226, 0.18);
  background: rgba(109, 40, 242, 0.03);
}

.apikey-copy {
  border-color: rgba(109, 40, 242, 0.24);
  background: rgba(109, 40, 242, 0.08);
  color: #5f24d8;
}

.apikey-delete {
  border-color: rgba(239, 71, 111, 0.24);
  background: rgba(239, 71, 111, 0.06);
  color: #c73659;
}

.apikey-docs {
  border-top-color: rgba(98, 43, 226, 0.1);
}

.api-example {
  background: #f4f0ff;
  border-color: rgba(109, 40, 242, 0.18);
  color: #4b2fb0;
}

.api-example-code {
  background: #f8f6ff;
  border-color: rgba(98, 43, 226, 0.12);
  color: #3f3658;
}

.promo-banner {
  background: rgba(109, 40, 242, 0.06);
  border-color: rgba(109, 40, 242, 0.16);
  color: #4b2fb0;
}

.recharge-plan,
.pay-methods button {
  background: #fff;
  border-color: rgba(98, 43, 226, 0.13);
}

.recharge-plan.hot {
  border-color: rgba(109, 40, 242, 0.3);
  background: linear-gradient(180deg, rgba(109, 40, 242, 0.08), #fff);
}

.recharge-plan b,
.pay-tabs button.active {
  color: #6d28f2;
}

.pay-tabs button.active {
  border-bottom-color: #6d28f2;
}

.brand-mark,
.score,
.recharge-btn,
.hero-icon,
.hero-card::before,
.composer::before,
.video-preview::after {
  animation: none !important;
}

/* Auth Modal */
.auth-modal {
  width: 380px;
  padding: 40px 36px 32px;
  text-align: center;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(109, 40, 242, 0.16);
  display: inline-grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #6d28f2;
  background: #fff;
  box-shadow: 0 8px 24px rgba(109, 40, 242, 0.12);
  margin-bottom: 16px;
}

.auth-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.auth-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--text);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.auth-tab.active {
  color: #6d28f2;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: #6d28f2;
  border-radius: 2px 2px 0 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.auth-field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.auth-field input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  border-color: #6d28f2;
  box-shadow: 0 0 0 3px rgba(109, 40, 242, 0.1);
}

.auth-code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.auth-code-row input {
  flex: 1;
  min-width: 0;
}

.auth-code-row button {
  flex-shrink: 0;
  width: 110px;
  height: 42px;
  border: 1px solid #6d28f2;
  border-radius: 8px;
  background: linear-gradient(135deg, #6d28f2 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  line-height: 1;
}

.auth-code-row button:hover {
  background: linear-gradient(135deg, #5b21d9 0%, #7c3aed 100%);
}

.auth-code-row button:active {
  transform: scale(0.97);
}

.auth-code-row button:disabled {
  background: #c4b5fd;
  border-color: #c4b5fd;
  cursor: not-allowed;
  opacity: 0.8;
}


.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #6d28f2;
  cursor: pointer;
}

.auth-field input::placeholder {
  color: #bbb;
}

.auth-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #6d28f2;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.auth-submit:hover {
  background: #5b21d9;
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-error {
  color: #ef476f;
  font-size: 13px;
  min-height: 20px;
  text-align: left;
  transition: color 0.2s ease;
}

.auth-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--dim);
}

.auth-footer a {
  color: #6d28f2;
  text-decoration: none;
  cursor: pointer;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--dim);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-social {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.auth-social button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-social button:hover {
  border-color: #6d28f2;
  box-shadow: 0 4px 12px rgba(109, 40, 242, 0.12);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: flex;
  flex-direction: column;
}

.start-use-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(109, 40, 242, 0.22);
  margin-top: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-use-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(109, 40, 242, 0.3);
}

.start-use-btn:active {
  transform: scale(0.97);
}


.apikey-btn {
  border: 1px solid rgba(0, 216, 232, 0.55);
  background: linear-gradient(135deg, rgba(0, 216, 232, 0.16), rgba(109, 40, 242, 0.12));
  color: #eaffff;
}

.apikey-btn em {
  background: rgba(0, 216, 232, 0.24);
  color: #eaffff;
}

.apikey-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 216, 232, 0.24);
}

.modal:has(.apikey-modal) {
  width: min(52rem, 94vw);
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  border-radius: 0.72rem;
  background: #fff;
  border: 1px solid rgba(98, 43, 226, 0.12);
  box-shadow: 0 24px 60px rgba(45, 28, 90, 0.12);
}

.modal:has(.apikey-modal) .modal-close {
  border-color: rgba(98, 43, 226, 0.12);
  background: #f7f5ff;
  color: #6f6a7c;
}

.modal:has(.apikey-modal) .modal-close:hover {
  border-color: rgba(109, 40, 242, 0.28);
  color: #171422;
}

.apikey-modal {
  max-height: 88vh;
  overflow: auto;
  padding: 1.5rem 1.6rem 2rem;
}

.apikey-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #171422;
}

.apikey-head p {
  margin: 0;
  color: #6f6a7c;
  font-size: 0.88rem;
  line-height: 1.55;
}

.apikey-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.15rem;
  margin-bottom: 0.85rem;
}

.apikey-create {
  border: 0;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  padding: 0.62rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(109, 40, 242, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.apikey-create:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(109, 40, 242, 0.24);
}

.apikey-create:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.apikey-usage-btn {
  border: 1px solid rgba(98, 43, 226, 0.2);
  border-radius: 0.55rem;
  background: #fff;
  color: #6f6a7c;
  padding: 0.62rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.apikey-usage-btn:hover {
  transform: translateY(-1px);
  color: #6d28f2;
  border-color: rgba(109, 40, 242, 0.38);
  background: rgba(109, 40, 242, 0.05);
}

.apikey-usage-btn.active {
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(109, 40, 242, 0.28);
}

.apikey-usage {
  margin-bottom: 1.1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(98, 43, 226, 0.16);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(109, 40, 242, 0.05), #fff);
}

.apikey-usage[hidden] {
  display: none;
}

.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.usage-user {
  font-size: 0.98rem;
  font-weight: 800;
  color: #171422;
}

.usage-group {
  font-size: 0.76rem;
  font-weight: 600;
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.08);
  border: 1px solid rgba(109, 40, 242, 0.16);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.usage-card {
  border: 1px solid rgba(98, 43, 226, 0.12);
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.7rem 0.8rem;
}

.usage-card.highlight {
  background: linear-gradient(135deg, rgba(109, 40, 242, 0.1), rgba(139, 92, 246, 0.06));
  border-color: rgba(109, 40, 242, 0.28);
}

.usage-label {
  font-size: 0.76rem;
  color: #6f6a7c;
  margin-bottom: 0.35rem;
}

.usage-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #171422;
  word-break: break-all;
}

.usage-card.highlight .usage-value {
  color: #6d28f2;
}

.usage-foot {
  margin-top: 0.85rem;
  font-size: 0.74rem;
  color: #8a8598;
  text-align: center;
}

.usage-state {
  padding: 1.1rem;
  text-align: center;
  color: #6f6a7c;
  font-size: 0.88rem;
}

.usage-state.error {
  color: #c73659;
}

.modal:has(.usage-modal) {
  width: min(64rem, 96vw);
  background: #fff;
  border: 1px solid rgba(98, 43, 226, 0.12);
  box-shadow: 0 24px 60px rgba(45, 28, 90, 0.12);
}

.usage-modal {
  width: 100%;
}

.usage-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-right: 2.4rem;
}

.usage-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.usage-modal-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(109, 40, 242, 0.14), rgba(139, 92, 246, 0.1));
  font-size: 1.3rem;
}

.usage-modal-title h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #171422;
}

.usage-modal-title p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: #6f6a7c;
}

.usage-back {
  border: 1px solid rgba(98, 43, 226, 0.2);
  background: #fff;
  color: #6f6a7c;
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.usage-back:hover {
  color: #171422;
  border-color: rgba(98, 43, 226, 0.4);
}

.usage-modal .usage-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.usage-log-wrap {
  margin-top: 1.25rem;
}

.usage-log-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: #171422;
  margin-bottom: 0.6rem;
}

.usage-log {
  max-height: 44vh;
  overflow: auto;
  border: 1px solid rgba(98, 43, 226, 0.12);
  border-radius: 0.7rem;
}

.usage-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.usage-log-table thead th {
  position: sticky;
  top: 0;
  background: #faf8ff;
  color: #6f6a7c;
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(98, 43, 226, 0.12);
  white-space: nowrap;
}

.usage-log-table tbody td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(98, 43, 226, 0.06);
  color: #3f3658;
  white-space: nowrap;
}

.usage-log-table tbody tr:last-child td {
  border-bottom: 0;
}

.usage-log-table tbody tr:hover {
  background: rgba(109, 40, 242, 0.03);
}

.usage-log-table .ul-model {
  font-weight: 700;
  color: #171422;
}

.usage-log-table .ul-cost {
  font-weight: 700;
  color: #6d28f2;
}

.usage-log-table .ul-time {
  color: #8a8598;
}

.usage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 1.15rem 0 0.7rem;
  flex-wrap: wrap;
}

.usage-ranges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.usage-ranges button {
  border: 1px solid rgba(98, 43, 226, 0.18);
  background: #fff;
  color: #6f6a7c;
  border-radius: 0.5rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.usage-ranges button:hover {
  border-color: rgba(109, 40, 242, 0.4);
  color: #6d28f2;
}

.usage-ranges button.active {
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  border-color: transparent;
}

.usage-export {
  border: 1px solid rgba(109, 40, 242, 0.3);
  background: rgba(109, 40, 242, 0.06);
  color: #6d28f2;
  border-radius: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.usage-export:hover {
  background: rgba(109, 40, 242, 0.12);
}

.usage-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.85rem 0 0.2rem;
}

.usage-pager button {
  border: 1px solid rgba(98, 43, 226, 0.2);
  background: #fff;
  color: #4b2fb0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.usage-pager button:hover:not(:disabled) {
  border-color: rgba(109, 40, 242, 0.45);
  background: rgba(109, 40, 242, 0.05);
}

.usage-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.usage-page-num {
  font-size: 0.82rem;
  color: #6f6a7c;
  font-weight: 600;
}

.apikey-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(98, 43, 226, 0.12);
  border-radius: 0.7rem;
  background: #faf8ff;
}

.apikey-form[hidden] {
  display: none;
}

.apikey-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 14rem;
  min-width: 0;
}

.apikey-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6f6a7c;
}

.apikey-field input {
  height: 2.35rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 43, 226, 0.14);
  background: #fff;
  color: #171422;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apikey-field input:focus {
  border-color: rgba(109, 40, 242, 0.5);
  box-shadow: 0 0 0 3px rgba(109, 40, 242, 0.15);
}

.apikey-form-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.apikey-submit,
.apikey-cancel {
  height: 2.35rem;
  padding: 0 1.05rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.apikey-submit {
  border: 0;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(109, 40, 242, 0.26);
}

.apikey-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(109, 40, 242, 0.32);
}

.apikey-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.apikey-cancel {
  border: 1px solid rgba(98, 43, 226, 0.18);
  background: #fff;
  color: #6f6a7c;
}

.apikey-cancel:hover {
  color: #171422;
  border-color: rgba(98, 43, 226, 0.35);
}

.apikey-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  min-height: 3.2rem;
}

.apikey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(98, 43, 226, 0.12);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 10px 24px rgba(45, 28, 90, 0.04);
}

.apikey-info {
  min-width: 0;
  flex: 1;
}

.apikey-name {
  font-weight: 700;
  color: #171422;
  margin-bottom: 0.18rem;
  font-size: 0.9rem;
}

.apikey-key {
  color: #8a8598;
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apikey-empty {
  color: #8a8598;
  border: 1px dashed rgba(98, 43, 226, 0.18);
  border-radius: 0.65rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
  background: #faf8ff;
}

.apikey-row-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.apikey-copy,
.apikey-delete {
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apikey-copy {
  border: 1px solid rgba(109, 40, 242, 0.28);
  background: rgba(109, 40, 242, 0.06);
  color: #6d28f2;
}

.apikey-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 242, 0.2);
}

.apikey-delete {
  border: 1px solid rgba(199, 54, 89, 0.28);
  background: rgba(199, 54, 89, 0.06);
  color: #c73659;
}

.apikey-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 71, 111, 0.18);
}

.apikey-docs {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(98, 43, 226, 0.1);
}

.api-hint {
  color: #6f6a7c;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.api-example {
  margin-top: 0.4rem;
  border-radius: 0.55rem;
  background: #f5f2ff;
  padding: 0.72rem 0.9rem;
  color: #2f2940;
  border: 1px solid rgba(109, 40, 242, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.api-example-code {
  margin: 0.75rem 0 0;
  border-radius: 0.65rem;
  background: #fafbff;
  border: 1px solid rgba(98, 43, 226, 0.12);
  padding: 0.9rem 1rem;
  color: #2f2940;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow-x: auto;
}

.api-example-code code {
  font: inherit;
  color: inherit;
}

@media (max-width: 720px) {
  .modal:has(.apikey-modal) {
    width: min(96vw, 56rem);
  }

  .apikey-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .apikey-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- 充值：档次 / 支付方式 选中态 ---------- */
.recharge-grid .recharge-plan.selected {
  border-color: #6d28f2;
  background: linear-gradient(180deg, rgba(109, 40, 242, 0.1), rgba(109, 40, 242, 0.03));
  box-shadow: 0 0 0 1px rgba(109, 40, 242, 0.35), 0 10px 24px rgba(109, 40, 242, 0.12);
}

.recharge-grid .recharge-plan.selected strong {
  color: #6d28f2;
}

.pay-methods .pay-method {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pay-methods .pay-method.selected {
  border-color: #6d28f2;
  background: rgba(109, 40, 242, 0.06);
  box-shadow: 0 0 0 1px rgba(109, 40, 242, 0.3);
}

.pay-methods .pay-method.selected i {
  border-color: #6d28f2;
  background: #6d28f2;
  box-shadow: inset 0 0 0 3px #fff;
}

/* ---------- 微信支付二维码弹框 ---------- */
.modal:has(.pay-qr-modal) {
  width: min(24rem, 92vw);
  padding: 0;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #fff;
}

.pay-qr-modal {
  padding: 1.6rem 1.5rem 1.8rem;
  text-align: center;
}

.pay-qr-head {
  margin-bottom: 1rem;
}

.pay-qr-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #171422;
}

.pay-qr-logo {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #14d870;
  color: #fff;
  font-style: normal;
  font-size: 0.9rem;
}

.pay-qr-amount {
  margin-bottom: 1.1rem;
  color: #171422;
}

.pay-qr-amount small {
  font-size: 1.1rem;
  font-weight: 700;
  margin-right: 0.15rem;
}

.pay-qr-amount strong {
  font-size: 2.1rem;
  font-weight: 900;
}

.pay-qr-box {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(98, 43, 226, 0.14);
  border-radius: 0.7rem;
  background: #fff;
}

.pay-qr-box img,
.pay-qr-box canvas {
  display: block;
}

.pay-qr-tip {
  margin: 1rem 0 0.35rem;
  color: #6f6a7c;
  font-size: 0.88rem;
}

.pay-qr-status {
  margin: 0;
  color: #9a94a8;
  font-size: 0.85rem;
}

.pay-qr-status.success {
  color: #18b981;
  font-weight: 700;
}

