﻿:root {
  --bg-top: #f7faff;
  --bg-bottom: #d7e2f6;
  --panel: rgba(246, 250, 255, 0.8);
  --panel-strong: rgba(252, 254, 255, 0.96);
  --line: rgba(27, 57, 103, 0.12);
  --text: #18263c;
  --muted: #5f6f84;
  --accent: #8ebcff;
  --accent-dark: #123d7a;
  --accent-soft: rgba(94, 142, 230, 0.16);
  --teal: #154eb2;
  --teal-soft: rgba(21, 78, 178, 0.14);
  --navy: #09172f;
  --gold: #f1c97a;
  --shadow: 0 24px 70px rgba(28, 54, 97, 0.14);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 26%),
    radial-gradient(circle at 80% 12%, rgba(107, 154, 235, 0.18), transparent 24%),
    linear-gradient(140deg, var(--bg-top) 0%, #eef4ff 44%, var(--bg-bottom) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 12px 12px;
  mix-blend-mode: soft-light;
  opacity: 0.22;
  pointer-events: none;
}

.orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.4;
  pointer-events: none;
}

.orb-warm {
  left: -8rem;
  top: -10rem;
  background: radial-gradient(circle, rgba(129, 176, 255, 0.42), transparent 68%);
}

.orb-cool {
  right: -10rem;
  bottom: -12rem;
  background: radial-gradient(circle, rgba(19, 71, 151, 0.26), transparent 68%);
}

.shell {
  width: min(1320px, calc(100vw - 1.25rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  display: block;
  padding: 1.4rem 0 1.1rem;
}

.brand-bar,
.brand-bar.panel {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 2rem 2rem;
  border-color: rgba(124, 175, 255, 0.28);
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 194, 255, 0.36), transparent 28%),
    radial-gradient(circle at 50% 110%, rgba(120, 177, 255, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(4, 18, 60, 0.97), rgba(5, 28, 86, 0.96) 50%, rgba(3, 17, 55, 0.98) 100%);
  box-shadow: 0 34px 100px rgba(3, 14, 44, 0.48);
}

.brand-bar::after {
  content: "";
  position: absolute;
  inset: auto 0 -35% 50%;
  transform: translateX(-50%);
  width: 32rem;
  height: 14rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(168, 215, 255, 0.34), transparent 68%);
  pointer-events: none;
}

.hero-mobile-poster {
  display: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(3, 16, 46, 0.34);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  text-align: left;
}

.brand-logo-card {
  width: 100%;
  padding: 1.4rem;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(234, 241, 255, 0.95));
  border: 2px solid rgba(180, 221, 255, 0.82);
  box-shadow:
    0 0 0 2px rgba(112, 182, 255, 0.14),
    0 0 22px rgba(117, 186, 255, 0.46),
    0 28px 70px rgba(3, 16, 46, 0.34);
}

.hero-logo-card {
  position: relative;
}

.hero-logo-card::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 40px;
  background: radial-gradient(circle, rgba(124, 201, 255, 0.22), transparent 72%);
  z-index: 0;
}

.hero-logo-card .brand-logo {
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: min(100%, 560px);
  height: auto;
  display: block;
  filter: none;
  margin: 0 auto;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 0.95rem;
  max-width: 680px;
  justify-items: start;
}

.hero-copy {
  width: 100%;
}

.brand-bar .kicker,
.hero-kicker {
  margin: 0;
  color: rgba(207, 226, 255, 0.92);
  text-shadow: 0 8px 24px rgba(7, 19, 48, 0.24);
}

.brand-bar h1 {
  color: #ffffff;
  text-shadow:
    0 0 16px rgba(164, 215, 255, 0.24),
    0 18px 40px rgba(4, 12, 31, 0.42);
}

.kicker,
.eyebrow {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.96;
}

h2 {
  margin: 0.15rem 0 0;
  font-size: 1.7rem;
}

h3 {
  margin: 0.2rem 0 0;
  font-size: 1.18rem;
}

.hero-text,
.request-status,
.empty-state,
.field small,
.dropzone span,
.stack-card p,
.result-meta p,
.card-meta,
.status-grid .label {
  color: var(--muted);
  line-height: 1.6;
}

.hero-text {
  max-width: 28ch;
  margin: 0;
  color: rgba(232, 241, 255, 0.95);
  font-size: 1.02rem;
  line-height: 1.72;
  text-shadow: 0 6px 22px rgba(6, 10, 24, 0.28);
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(173, 203, 255, 0.32);
  background: linear-gradient(180deg, rgba(8, 35, 95, 0.9), rgba(7, 28, 80, 0.88));
  color: #f6f9ff;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 1px rgba(136, 196, 255, 0.08),
    0 0 18px rgba(95, 170, 255, 0.2);
}

.hero-feature-grid {
  display: flex;
  width: auto;
}

.hero-feature-card {
  min-height: 2.15rem;
  padding: 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.panel-head,
.panel-head.compact,
.action-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.workspace-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(18, 61, 122, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 255, 0.92));
}

.workspace-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(18, 61, 122, 0.94), rgba(142, 188, 255, 0.92), rgba(241, 201, 122, 0.82));
}

.stack-card,
.result-meta-card,
.gallery-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(40, 53, 65, 0.08);
  background: var(--panel-strong);
}

.app-grid {
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

.side-column {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.full-width {
  grid-column: 1 / -1;
}

.studio-form,
.upload-panel {
  display: grid;
  gap: 1rem;
}

.control-grid {
  display: grid;
  gap: 0.9rem;
}

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

.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.field {
  display: grid;
  gap: 0.45rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field span {
  font-weight: 700;
}

textarea,
select,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"] {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 56, 100, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 0.9rem 1rem;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

textarea {
  resize: vertical;
  min-height: 12rem;
}

textarea:focus,
select:focus,
input:focus,
.dropzone:focus {
  outline: 2px solid rgba(94, 142, 230, 0.28);
  outline-offset: 1px;
}

.ghost-button,
.primary-button,
.mini-button,
.stack-action {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.ghost-button,
.stack-action,
.mini-button {
  border-radius: 999px;
  min-height: 2.8rem;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-dark);
  font-weight: 700;
  border: 1px solid rgba(21, 78, 178, 0.14);
  box-shadow: 0 12px 26px rgba(18, 61, 122, 0.06);
}

.primary-button {
  border-radius: 999px;
  min-height: 3rem;
  padding: 0 1.25rem;
  background: linear-gradient(135deg, #0f2f65, #1b63d1 56%, #79b9ff 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 18px 38px rgba(21, 78, 178, 0.26);
}

.ghost-button:hover,
.primary-button:hover,
.mini-button:hover,
.stack-action:hover {
  transform: translateY(-2px);
}

.ghost-button:hover,
.stack-action:hover,
.mini-button:hover {
  box-shadow: 0 16px 30px rgba(18, 61, 122, 0.1);
}

.primary-button:hover {
  box-shadow: 0 22px 40px rgba(21, 78, 178, 0.34);
}

.action-strip {
  flex-wrap: wrap;
  align-items: center;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 8.5rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(77, 148, 212, 0.28);
  background: linear-gradient(135deg, rgba(77, 148, 212, 0.08), rgba(106, 174, 232, 0.12));
  text-align: center;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(77, 148, 212, 0.14), rgba(106, 174, 232, 0.18));
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.preview-grid,
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.preview-grid,
.stack-list,
.result-meta,
.gallery {
  border-radius: var(--radius-lg);
  min-height: 8rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.52);
  border: 1px dashed rgba(40, 53, 65, 0.14);
}

.preview-card,
.gallery-card,
.stack-card {
  overflow: hidden;
}

.preview-card,
.gallery-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(40, 53, 65, 0.08);
}

.preview-card img,
.gallery-card img,
.stack-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.preview-card img,
.gallery-card img {
  aspect-ratio: 1 / 1;
}

.preview-card footer,
.gallery-card .card-body,
.stack-card .card-body,
.result-meta-card {
  padding: 0.95rem;
}

.preview-card footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.preview-card p,
.gallery-card p,
.stack-card p {
  margin: 0;
}

.stack-list {
  display: grid;
  gap: 0.9rem;
}

.account-panel-body,
.order-list {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.recharge-status {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.recharge-status.hidden {
  display: none;
}

.recharge-status[data-state="success"] {
  color: var(--teal);
}

.recharge-status[data-state="error"] {
  color: var(--accent-dark);
}

.qr-block {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(77, 148, 212, 0.24);
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  width: 100%;
}

.qr-image {
  width: min(260px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(77, 148, 212, 0.12);
  display: block;
  image-rendering: pixelated;
}

.qr-tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.h5-pay-block {
  justify-items: start;
  text-align: left;
}

.auth-switch {
  display: flex;
  gap: 0.7rem;
}

.auth-form,
.recharge-form {
  display: grid;
  gap: 0.9rem;
}

.full-button {
  width: 100%;
}

.account-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.account-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.account-sub,
.account-tip {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.wallet-balance-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(44, 88, 126, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(220, 236, 255, 0.55));
  padding: 1rem;
}

.wallet-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.wallet-balance {
  display: block;
  margin-top: 0.4rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent-dark);
}

.account-inner-head {
  margin-bottom: 0.5rem;
}

.active-tab {
  background: linear-gradient(135deg, rgba(77, 148, 212, 0.18), rgba(106, 174, 232, 0.22));
  color: var(--accent-dark);
}

.stack-card {
  display: grid;
  gap: 0;
}

.stack-card.with-thumb {
  grid-template-columns: 90px 1fr;
}

.stack-card img {
  height: 100%;
  min-height: 90px;
}

.stack-card h3,
.gallery-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.stack-actions,
.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.stack-action.danger,
.mini-button.danger {
  color: #7f4f4f;
  border-color: rgba(162, 112, 112, 0.18);
  background: rgba(162, 112, 112, 0.08);
}

.result-meta-card {
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid rgba(40, 53, 65, 0.08);
}

.result-meta-card p {
  margin: 0.35rem 0;
}

.gallery-card .card-actions a,
.gallery-card .card-actions button {
  text-decoration: none;
}

.card-meta {
  font-size: 0.92rem;
}

.request-status[data-state="loading"] {
  color: var(--teal);
}

.request-status[data-state="error"] {
  color: var(--accent-dark);
}

@media (max-width: 1100px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .brand-copy {
    justify-items: center;
  }

  .hero-chip-row {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 0.9rem, 100%);
  }

  .three-up,
  .four-up,
  .two-up {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-strip {
    align-items: stretch;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.65rem;
  }

  .action-strip .ghost-button,
  .action-strip .primary-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0.7rem;
    font-size: 0.92rem;
  }

  .account-panel > .panel-head .eyebrow,
  .workspace-panel > .panel-head .eyebrow,
  .upload-panel .panel-head .eyebrow,
  .library-panel > .panel-head .eyebrow,
  .order-block .eyebrow,
  .history-panel > .panel-head .eyebrow,
  .results-panel > .panel-head .eyebrow {
    display: none;
  }

  .workspace-panel > .panel-head,
  .upload-panel .panel-head,
  .library-panel > .panel-head,
  .results-panel > .panel-head {
    align-items: center;
  }

  .workspace-panel > .panel-head > div,
  .upload-panel .panel-head > div,
  .library-panel > .panel-head > div,
  .results-panel > .panel-head > div {
    width: 100%;
    text-align: center;
  }

  .account-panel > .panel-head h2,
  .workspace-panel > .panel-head h2,
  .upload-panel .panel-head h3,
  .library-panel > .panel-head h2,
  .history-panel > .panel-head h2,
  .results-panel > .panel-head h2,
  .order-block .panel-head h3 {
    margin-top: 0;
  }

  .brand-logo {
    width: 100%;
  }

  .brand-bar {
    padding: 1.35rem 1rem 1.2rem;
  }

  .hero-mobile-poster {
    display: block;
  }

  .hero-stage {
    display: none;
  }

  .stack-card.with-thumb {
    grid-template-columns: 1fr;
  }

  .stack-card img {
    aspect-ratio: 16 / 9;
  }

  .preview-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .preview-card,
  .gallery-card {
    width: 100%;
    min-width: 0;
  }

  .preview-card img,
  .gallery-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(72vw, 320px);
    object-fit: cover;
  }

  .preview-card footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .preview-card footer p,
  .gallery-card p {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
