:root {
  --blue: #1669ff;
  --blue-2: #2f7dff;
  --blue-3: #eaf2ff;
  --ink: #0f1f3a;
  --muted: #71809b;
  --line: #e7edf7;
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: 0 12px 36px rgba(44, 84, 142, 0.1);
  --radius: 14px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 1440px;
  background:
    linear-gradient(rgba(226, 236, 252, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 236, 252, 0.42) 1px, transparent 1px),
    radial-gradient(circle at 76% 20%, rgba(91, 154, 255, 0.2), transparent 34%),
    #f8fbff;
  background-size: 40px 40px, 40px 40px, auto, auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  min-width: 1440px;
  padding-top: 70px;
}

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  height: 70px;
  min-width: 1440px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 345px;
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
}

.brand-ai {
  color: #ef233c;
}

.brand-divider {
  height: 28px;
  width: 1px;
  background: #dfe6f1;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  height: 100%;
}

.topnav.compact {
  gap: 28px;
}

.topnav-btn {
  position: relative;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #25324a;
  font-size: 14px;
  font-weight: 600;
  padding: 0 10px;
  white-space: nowrap;
}

.topnav-btn.active {
  color: var(--blue);
}

.topnav-btn.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--blue);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 0 0 auto;
}

.search {
  width: 250px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #7b879d;
  background: #f3f6fb;
  border: 1px solid #edf1f7;
  border-radius: 999px;
  font-size: 13px;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  border-left: 1px solid #e5ebf5;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e9eff8, #cbd8ec);
  color: #fff;
  font-weight: 700;
}

.user-name {
  font-weight: 700;
  font-size: 14px;
}

.user-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.bell {
  position: relative;
  color: #263a5b;
  font-size: 19px;
}

.bell::after {
  content: "8";
  position: absolute;
  top: -9px;
  right: -9px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #f02932;
  font-size: 11px;
  font-weight: 700;
}

.side {
  position: fixed;
  z-index: 10;
  top: 92px;
  left: 17px;
  bottom: 24px;
  width: 172px;
  padding: 17px 12px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e9eff8;
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.side-divider {
  height: 1px;
  margin: 14px 12px;
  background: #e8eef7;
}

.side-bottom {
  margin-top: auto;
}

.side-btn {
  height: 47px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #31415d;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.side-btn.active {
  color: var(--blue);
  background: linear-gradient(90deg, #eef4ff, #e9f1ff);
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex: 0 0 auto;
}

.main {
  margin-left: 216px;
  padding: 26px 24px 28px 0;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(690px, 1fr) 458px;
  gap: 28px;
}

.hero-row {
  position: relative;
  min-height: 190px;
  padding: 20px 0 0 10px;
}

.page-title {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #0f1f3a;
}

.hello {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 700;
}

.blue {
  color: var(--blue);
}

.subtle {
  color: var(--muted);
}

.hero-desc {
  margin-top: 14px;
  font-size: 15px;
  color: #66758f;
}

.hero-art {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 360px;
  height: 170px;
  opacity: 0.92;
}

.art-window,
.art-stack,
.art-cup,
.art-plant {
  position: absolute;
  border-radius: 14px;
  background: linear-gradient(145deg, #d9e9ff, #6ca8ff);
  box-shadow: 0 20px 42px rgba(46, 113, 221, 0.18);
}

.art-window {
  left: 70px;
  top: 24px;
  width: 145px;
  height: 105px;
}

.art-window::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 22px;
  width: 78px;
  height: 48px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
}

.art-stack {
  right: 70px;
  top: 32px;
  width: 86px;
  height: 98px;
  transform: skewY(-4deg);
  opacity: 0.75;
}

.art-cup {
  right: 115px;
  bottom: 12px;
  width: 55px;
  height: 43px;
  background: #f8fbff;
  border: 1px solid #d8e6fa;
}

.art-cup::after {
  content: "XDF AI";
  position: absolute;
  left: 9px;
  top: 14px;
  font-size: 8px;
  color: #5a7fb8;
  font-weight: 700;
}

.art-plant {
  right: 50px;
  bottom: 8px;
  width: 42px;
  height: 64px;
  background: linear-gradient(160deg, #56c38c, #c7ead8);
  clip-path: polygon(48% 0, 63% 36%, 98% 21%, 75% 51%, 100% 74%, 61% 66%, 50% 100%, 39% 66%, 0 74%, 25% 51%, 2% 21%, 37% 36%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  min-height: 145px;
  padding: 25px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(28, 66, 123, 0.07);
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 16px;
}

.stat-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f1ff;
  color: var(--blue);
  font-weight: 800;
}

.stat-value {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 31px;
  font-weight: 800;
}

.stat-unit {
  font-size: 16px;
  font-weight: 600;
}

.trend {
  margin-top: 5px;
  color: #66758f;
  font-size: 13px;
}

.up {
  color: #f0303b;
}

.down {
  color: #11a46a;
}

.spark {
  float: right;
  width: 74px;
  height: 32px;
  margin-top: -22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.activity-panel {
  min-height: 368px;
  padding: 25px 24px 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 800;
}

.link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.ghost-btn {
  height: 34px;
  padding: 0 13px;
  border: 1px solid #e1e9f6;
  background: #fff;
  color: var(--blue);
  border-radius: 8px;
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.tab {
  position: relative;
  padding-bottom: 12px;
  color: #4b5870;
  font-size: 14px;
  font-weight: 700;
}

.tab.active {
  color: var(--blue);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
}

.activity-row {
  height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr 190px 72px;
  align-items: center;
  border-bottom: 1px solid #ecf1f8;
  gap: 10px;
}

.doc-ico,
.file-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #e9f2ff;
  color: var(--blue);
}

.row-title {
  font-size: 14px;
  font-weight: 800;
  color: #17233b;
}

.row-meta {
  margin-top: 4px;
  color: #78869f;
  font-size: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.status.blue {
  background: #e7f0ff;
  color: var(--blue);
}

.status.green {
  background: #e9f8f1;
  color: #18a768;
}

.status.orange {
  background: #fff2dd;
  color: #f18b13;
}

.faces {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.face {
  width: 25px;
  height: 25px;
  margin-left: -6px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #dbeafe, #a9c4f7);
}

.more-face {
  margin-left: 4px;
  height: 24px;
  min-width: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf3fb;
  color: #6b7890;
  font-size: 12px;
  font-weight: 700;
}

.date {
  color: #7b88a0;
  font-size: 13px;
  text-align: right;
}

.center-link {
  text-align: center;
  margin-top: 14px;
}

.right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.models-panel,
.docs-panel {
  padding: 24px 27px;
}

.model-row {
  height: 76px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf2f8;
}

.model-row > div {
  min-width: 0;
}

.model-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf7f1;
  color: #0a9b61;
  font-weight: 900;
  font-size: 20px;
}

.model-logo.ai {
  color: #111;
  background: #f2ebe3;
}

.model-title {
  font-weight: 800;
  font-size: 15px;
}

.model-desc {
  margin-top: 5px;
  font-size: 12px;
  color: #6b7893;
}

.models-panel .model-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blue-btn {
  height: 34px;
  border: 0;
  min-width: 86px;
  padding: 0 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2679ff, #1263f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(18, 99, 241, 0.24);
}

.doc-row {
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  min-height: 62px;
  gap: 12px;
  border-bottom: 1px solid #edf2f8;
}

.doc-name {
  font-size: 14px;
  font-weight: 800;
}

.doc-meta {
  margin-top: 5px;
  font-size: 12px;
  color: #78869d;
}

.bottom-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 18px;
}

.feature-card {
  height: 94px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 58px 1fr 24px;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(32, 76, 135, 0.06);
}

.big-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
}

.feature-title {
  font-size: 17px;
  font-weight: 800;
}

.feature-desc {
  margin-top: 7px;
  color: #66758c;
  font-size: 13px;
}

.arrow {
  font-size: 26px;
  color: #121b2d;
}

.studio-layout {
  display: grid;
  grid-template-columns: 365px minmax(520px, 1fr) 338px;
  gap: 16px;
}

.studio-layout.video {
  grid-template-columns: 390px minmax(430px, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.studio-main {
  padding-top: 8px;
}

.studio-title-row {
  margin: 4px 0 14px;
}

.title-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.studio-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
}

.studio-sub {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
}

.form-panel {
  padding: 18px;
}

.video-form {
  padding: 18px;
}

.mode-switch {
  height: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid #e1e9f5;
  border-radius: 10px;
  background: #f6f9fe;
}

.mode-pill {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4b5870;
  font-size: 14px;
  font-weight: 800;
}

.mode-pill.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 12px rgba(36, 100, 190, 0.1);
}

.form-section {
  margin-top: 16px;
}

.form-section:first-of-type {
  margin-top: 0;
}

.form-section.compact {
  margin-top: 14px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.field-label {
  margin: 0 0 9px;
  font-size: 14px;
  font-weight: 800;
}

.field-label.required::after {
  content: " *";
  color: #ef233c;
}

.text-box {
  width: 100%;
  height: 112px;
  resize: none;
  padding: 14px;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  color: #26324a;
  background: #fff;
  line-height: 1.55;
}

.text-box.small {
  height: 106px;
}

.textarea-wrap {
  position: relative;
}

.video-prompt {
  height: 128px;
  padding: 15px 16px 34px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.75;
}

.count {
  text-align: right;
  margin-top: -25px;
  margin-bottom: 16px;
  padding-right: 10px;
  color: #8793a8;
  font-size: 12px;
}

.textarea-wrap .count {
  position: absolute;
  right: 13px;
  bottom: 10px;
  margin: 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
}

.upload {
  min-height: 72px;
  border: 1px dashed #d8e2f0;
  border-radius: 8px;
  color: #8793a8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  background: #fbfdff;
}

.upload.with-thumb {
  justify-content: space-between;
  min-height: 82px;
  padding: 12px 12px 12px 16px;
  text-align: left;
}

.upload-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-copy b {
  color: #35445f;
  font-size: 13px;
}

.upload-copy span {
  color: #8390a6;
  font-size: 12px;
}

.mini-thumb {
  width: 70px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid #d8e5f3;
  background:
    radial-gradient(circle at 74% 22%, rgba(92, 177, 118, 0.28), transparent 22%),
    linear-gradient(135deg, #eef6ff, #c8dcf7);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.choice-grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.choice-grid.purpose {
  grid-template-columns: repeat(4, 1fr);
}

.choice-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.choice-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.choice {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #fff;
  color: #394761;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.choice.active {
  color: var(--blue);
  border-color: var(--blue);
  background: #f4f8ff;
}

.style-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.style-card {
  height: 68px;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  color: #526079;
  font-size: 11px;
  text-align: center;
}

.style-card.active {
  border-color: var(--blue);
  color: var(--blue);
}

.style-swatch {
  height: 40px;
  background: linear-gradient(135deg, #e5f1ff, #bdd7ff);
}

.style-swatch.green {
  background: linear-gradient(135deg, #e9f7ef, #c5e7d3);
}

.style-swatch.gray {
  background: linear-gradient(135deg, #eef2f7, #d5dde9);
}

.generate-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  margin-top: 16px;
  background: linear-gradient(180deg, #2479ff, #1262f2);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(18, 99, 241, 0.22);
}

.form-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
}

.form-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf2f8;
}

.mini-link {
  padding: 0;
  font-size: 12px;
}

.cost-line {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #8793a8;
  font-size: 12px;
}

.gallery-panel {
  padding: 19px 18px 14px;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.head-title {
  font-size: 19px;
  font-weight: 800;
}

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

.tool-btn {
  height: 34px;
  border: 1px solid #e2e9f4;
  background: #fff;
  border-radius: 7px;
  padding: 0 12px;
  color: #42516b;
  font-weight: 700;
}

.grid-btn {
  width: 38px;
  padding: 0;
  color: var(--blue);
}

.complete {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #66758f;
  font-size: 13px;
  margin-bottom: 10px;
}

.dot-ok {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2fbf72;
  color: #fff;
  font-size: 11px;
}

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

.gallery-item {
  position: relative;
  min-height: 260px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dfe8f5;
  background: #eef5ff;
  box-shadow: 0 8px 24px rgba(40, 77, 130, 0.05);
}

.gallery-item.selected {
  outline: 2px solid var(--blue);
}

.check {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
}

.poster {
  height: 100%;
  padding: 46px 34px 24px;
  color: #17405a;
  background:
    radial-gradient(circle at 80% 6%, rgba(110, 180, 126, 0.28), transparent 20%),
    linear-gradient(135deg, #eef8f0, #fffdf5);
}

.poster h3 {
  margin: 0;
  font-size: 33px;
  line-height: 1.18;
  letter-spacing: 1px;
}

.poster p {
  color: #55706d;
  line-height: 1.65;
}

.poster.math h3 {
  font-size: 25px;
}

.poster.physics {
  background: linear-gradient(145deg, #eaf5ff, #f7fbff);
}

.poster.quote {
  background: linear-gradient(145deg, #f0f8ee, #fff);
}

.formula {
  margin: 12px 0;
  font-size: 18px;
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selected-panel,
.available-panel {
  padding: 20px;
}

.selected-preview {
  height: 305px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dfe8f5;
}

.file-info {
  color: #7b879d;
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0;
}

.download-btn {
  width: 100%;
  height: 42px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-weight: 800;
}

.model-option {
  min-height: 66px;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
  margin-top: 10px;
}

.model-option.active {
  border-color: var(--blue);
  background: #f8fbff;
}

.banana {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff3a7;
}

.scene-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 18px;
  grid-column: 1 / -1;
}

.scene-card {
  height: 70px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}

.video-preview {
  padding: 21px 21px 17px;
}

.preview-frame {
  height: 376px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 82% 20%, rgba(126, 184, 133, 0.28), transparent 18%),
    linear-gradient(145deg, #fbfbf1, #dcebd3 42%, #314738 43%, #18372d);
  box-shadow: inset 0 -56px 0 rgba(0, 0, 0, 0.4);
}

.chalkboard {
  position: absolute;
  inset: 44px 42px 86px;
  border: 8px solid #8a673d;
  background: #264336;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.chalk-title {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
}

.chalk-sub {
  margin-top: 15px;
  font-size: 19px;
  letter-spacing: 6px;
}

.fraction-row {
  display: flex;
  gap: 32px;
  margin-top: 22px;
}

.fraction {
  width: 48px;
  height: 48px;
  border: 2px solid #dfeee6;
  border-radius: 50%;
  position: relative;
}

.fraction::before,
.fraction::after {
  content: "";
  position: absolute;
  background: #dfeee6;
}

.fraction::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
}

.fraction::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
}

.player-bar {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 17px;
  height: 34px;
  display: grid;
  grid-template-columns: 28px 1fr 38px 44px 24px;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 42%;
  background: #2d7dff;
}

.step-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
  color: #68758d;
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  content: "";
  display: block;
  height: 2px;
  background: #e2e9f4;
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
}

.step-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d8e3f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step.done .step-dot,
.step.active .step-dot {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.model-large {
  display: grid;
  grid-template-columns: 62px 1fr 18px;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  border: 1px solid #e0e8f4;
  border-radius: 11px;
  padding: 15px;
  margin-top: 12px;
}

.model-large.active {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(22, 105, 255, 0.08);
}

.s-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: #eaf2ff;
  font-size: 28px;
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.tag {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.task-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  min-height: 76px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f8;
}

.task-thumb {
  border-radius: 8px;
  background: linear-gradient(135deg, #dcedff, #91bfff);
}

.quota-card {
  padding: 20px;
  background: linear-gradient(145deg, #f5f9ff, #eaf3ff);
}

.quota-value {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
}

.quota-line {
  height: 8px;
  border-radius: 999px;
  background: #dbe7f8;
  margin-top: 14px;
  overflow: hidden;
}

.quota-line span {
  display: block;
  height: 100%;
  width: 58%;
  background: linear-gradient(90deg, var(--blue), #4bc0d9);
}

.recommend {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
}

.recommend-card {
  height: 74px;
  display: grid;
  grid-template-columns: 92px 1fr 20px;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}

.rec-thumb {
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #9fc5ff);
}

.chat-main {
  display: grid;
  grid-template-columns: 280px minmax(470px, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.chat-history {
  min-height: calc(100vh - 124px);
  padding: 16px;
}

.chat-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.new-chat-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 105, 255, 0.22);
}

.history-search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  color: #7a879d;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 700;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.history-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  background: transparent;
  color: #263650;
  text-align: left;
}

.history-item.active {
  border-color: #cfe0ff;
  background: #f2f7ff;
}

.history-item b {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.history-item small {
  display: block;
  margin-top: 5px;
  color: #8190a7;
  font-size: 11px;
}

.history-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: #eaf2ff;
}

.chat-history-foot {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #edf2f8;
}

.outline-btn {
  height: 36px;
  border: 1px solid #dfe7f3;
  border-radius: 9px;
  background: #fff;
  color: #43536e;
  font-size: 13px;
  font-weight: 800;
}

.chat-workspace {
  min-height: calc(100vh - 124px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2f8;
}

.chat-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.chat-meta {
  margin-top: 7px;
  color: #748198;
  font-size: 12px;
}

.chat-head-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-thread {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
}

.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f2ff;
  color: var(--blue);
  font-weight: 900;
}

.message-avatar.ai {
  background: linear-gradient(135deg, #eaf7f1, #d7eee3);
  color: #0a9b61;
}

.message-body {
  border: 1px solid #e4ebf5;
  border-radius: 12px;
  padding: 14px 15px;
  background: #fff;
}

.ai-message .message-body {
  background: linear-gradient(180deg, #fbfdff, #f8fbff);
}

.message-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7a879d;
  font-size: 12px;
}

.message-top b {
  color: #1d2c45;
  font-size: 14px;
}

.message-body p {
  margin: 10px 0 0;
  color: #263650;
  font-size: 14px;
  line-height: 1.8;
}

.attachment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.attachment-row span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  background: #f1f6ff;
  color: #45628e;
  font-size: 12px;
  font-weight: 700;
}

.answer-block {
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #fff;
  color: #263650;
  font-size: 13px;
  line-height: 1.7;
}

.answer-block ol {
  margin: 8px 0 0 18px;
  padding: 0;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.message-actions button {
  height: 30px;
  border: 1px solid #dfe7f3;
  border-radius: 7px;
  background: #fff;
  color: #526179;
  font-size: 12px;
  font-weight: 800;
}

.prompt-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 20px 14px;
}

.prompt-card {
  min-height: 66px;
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  text-align: left;
}

.prompt-card b {
  display: block;
  color: #1d2c45;
  font-size: 13px;
}

.prompt-card span {
  display: block;
  margin-top: 5px;
  color: #75849b;
  font-size: 12px;
  line-height: 1.45;
}

.composer {
  margin: auto 20px 20px;
  border: 1px solid #cfdcf0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 76, 135, 0.08);
  overflow: hidden;
}

.composer-tools {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #edf2f8;
  color: #75849b;
  font-size: 12px;
  font-weight: 800;
}

.composer-tools button {
  height: 26px;
  border: 1px solid #dce6f5;
  border-radius: 7px;
  background: #f8fbff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.composer textarea {
  width: 100%;
  height: 88px;
  border: 0;
  resize: none;
  padding: 13px 14px;
  color: #263650;
  outline: none;
}

.composer-bottom {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-top: 1px solid #edf2f8;
}

.model-chip {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.send-btn {
  height: 32px;
  min-width: 74px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.chat-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-panel {
  padding: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid #e4ebf6;
  border-radius: 10px;
  background: #f6f9fe;
}

.segmented button {
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #526179;
  font-size: 13px;
  font-weight: 800;
}

.segmented button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 12px rgba(36, 100, 190, 0.1);
}

.config-note {
  margin-top: 12px;
  color: #748198;
  font-size: 12px;
  line-height: 1.65;
}

.cap-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.cap-list span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2eaf5;
  border-radius: 9px;
  color: #43536e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.video-form .mode-switch {
  height: 44px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid #e4ebf6;
  border-radius: 12px;
  background: #f5f8fd;
}

.video-form .mode-pill {
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #526179;
  font-size: 14px;
  font-weight: 800;
}

.video-form .mode-pill.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 82, 154, 0.12);
}

.video-form .label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-form .mini-link {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: #6f7d94;
  font-size: 12px;
  font-weight: 700;
}

.video-form .mini-link:hover {
  color: var(--blue);
  background: #eef4ff;
}

@media (max-width: 1440px) {
  body,
  .app-shell,
  .topbar {
    min-width: 1280px;
  }

  .brand {
    min-width: 285px;
  }

  .topnav.compact {
    gap: 8px;
  }

  .topnav-btn {
    padding: 0 7px;
  }

  .side {
    padding: 12px;
  }

  .side-menu {
    gap: 4px;
  }

  .side-btn {
    height: 39px;
    border-radius: 8px;
    font-size: 14px;
  }

  .side-divider {
    margin: 8px 12px;
  }

  .workbench {
    grid-template-columns: minmax(600px, 1fr) 390px;
    gap: 14px;
  }

  .stat-card {
    padding: 22px 18px;
  }

  .stat-head {
    gap: 9px;
    font-size: 15px;
    white-space: nowrap;
  }

  .stat-ico {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .stat-value {
    font-size: 29px;
  }

  .studio-layout {
    grid-template-columns: 330px minmax(420px, 1fr) 260px;
    gap: 14px;
  }

  .studio-layout.video {
    grid-template-columns: 360px minmax(360px, 1fr) 270px;
    gap: 14px;
  }

  .studio-layout.video .selected-panel,
  .studio-layout.video .available-panel {
    padding: 16px;
  }

  .studio-layout.video .model-large {
    grid-template-columns: 48px 1fr 14px;
    gap: 10px;
    padding: 12px;
  }

  .studio-layout.video .s-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 24px;
  }

  .chat-main {
    grid-template-columns: 260px minmax(420px, 1fr) 260px;
    gap: 14px;
  }

  .chat-config .model-option {
    grid-template-columns: 38px 1fr;
    padding: 10px;
    gap: 9px;
  }

  .chat-config .model-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 16px;
  }

  .model-row {
    grid-template-columns: 44px minmax(0, 1fr) 88px;
    gap: 10px;
  }

  .model-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 18px;
  }
}
