:root {
  --bg: #07111f;
  --bg-soft: #0f1a2e;
  --panel: rgba(9, 17, 30, 0.82);
  --panel-border: rgba(148, 163, 184, 0.16);
  --text: #e5eefc;
  --text-soft: #8ea4c8;
  --accent: #7c9cff;
  --accent-strong: #9d7cff;
  --success: #34d399;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(157, 124, 255, 0.22), transparent 24%),
    linear-gradient(180deg, #09111d 0%, #07111f 55%, #050b15 100%);
  display: flex;
  flex-direction: column;
}

.lang-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 24px;
  margin: 0 auto;
  width: min(1200px, calc(100% - 32px));
}

.lang-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-right: 4px;
}

.about-link {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(142, 164, 200, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  margin-right: 8px;
}

.about-link:hover {
  background: rgba(124, 156, 255, 0.12);
  color: #d8e2ff;
  border-color: rgba(124, 156, 255, 0.4);
}

.lang-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(142, 164, 200, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.lang-btn:hover {
  background: rgba(124, 156, 255, 0.12);
  color: #d8e2ff;
  border-color: rgba(124, 156, 255, 0.4);
}

.lang-btn.active {
  background: rgba(124, 156, 255, 0.2);
  color: #fff;
  border-color: var(--accent);
}

button,
input,
select {
  font: inherit;
}

.page {
  flex: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.hero-copy {
  padding: 32px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #d8e2ff;
  background: rgba(124, 156, 255, 0.12);
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.8;
}

.hero-card {
  padding: 24px;
  display: grid;
  gap: 12px;
  align-content: center;
}

.badge {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe7ff;
}

.workspace {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
}

.panel {
  padding: 28px;
}

.panel h2,
.panel h3 {
  margin: 0 0 16px;
}

.upload-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1.5px dashed rgba(142, 164, 200, 0.35);
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  background: rgba(255, 255, 255, 0.02);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.9);
  background: rgba(124, 156, 255, 0.08);
}

.upload-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.upload-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
}

.preview-wrap {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
}

.preview-box {
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  display: grid;
  place-items: center;
}

.preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  color: var(--text-soft);
}

.meta-list {
  display: grid;
  gap: 12px;
}

.meta-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.meta-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: var(--text-soft);
}

.field select,
.field input[type="color"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(142, 164, 200, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
}

.field input[type="color"] {
  padding: 8px;
}

.field-slider input[type="range"] {
  width: 100%;
}

.export-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.tips {
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.tips ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.8;
}

.output-panel {
  margin-top: 24px;
}

.output-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status {
  color: var(--success);
}

.output-note {
  margin: 0 0 20px;
  color: var(--text-soft);
  line-height: 1.7;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.sample-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.sample-card canvas {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.sample-card span {
  font-weight: 700;
}

.sample-card small {
  color: var(--text-soft);
}

.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 16px 32px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.footer-copy {
  margin: 0 0 6px;
}

.footer-icp {
  margin: 0;
}

.footer-icp a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-icp a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .sample-grid,
  .export-actions,
  .preview-wrap {
    grid-template-columns: 1fr;
  }

  .output-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
