:root {
  --font-serif: "Noto Serif SC", "Source Han Serif SC", serif;
  --font-sans: "Manrope", "Source Han Sans SC", system-ui, sans-serif;
  --primary: #1a1a1a;
  --accent: #d4af37;
  --bg-color: #f8fafc; /* 清透的瓷白色，降亮但不显脏 */
  --card-bg: #ffffff;
  --text-main: #23292e;
  --text-muted: #94a3b8;
  --border-color: #f1f5f9;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Accents - Soft Flow */
.bg {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
}
.bg-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #e0e7ff 0%, transparent 70%); /* 极淡紫罗兰 */
  top: -200px;
  right: -100px;
}
.bg-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f0fdf4 0%, transparent 70%); /* 极淡薄荷绿 */
  bottom: -150px;
  left: -50px;
}

/* Topbar & Branding */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 5vw, 4rem);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.brand-logo {
  height: clamp(50px, 8vw, 95px);
  width: auto;
}
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-cn {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.0;
  color: var(--primary);
}
.brand-en {
  font-size: clamp(0.6rem, 1vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.slogan-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  pointer-events: none;
}
.slogan-item {
  font-family: var(--font-serif);
  font-size: clamp(0.8rem, 1.1vw, 1.1rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: clamp(1px, 0.3vw, 4px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: clamp(4rem, 12vh, 8rem) 1.5rem clamp(2rem, 8vh, 5rem);
  max-width: 900px;
  margin: 0 auto;
}
.hero-section h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 400;
}

.btn-nav {
  padding: 0.9rem clamp(1.5rem, 3vw, 2.8rem);
  border: 1px solid var(--primary);
  background: transparent;
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin: 0.5rem;
  border-radius: 4px;
}

/* Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 550px), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1400px;
  margin: 0 auto 8rem;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

.config-area, .result-area {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.mode-btn {
  padding: 1.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: all 0.4s;
}
.mode-btn.is-active {
  border-color: #cbd5e1;
  box-shadow: 0 20px 40px rgba(0,0,0,0.03);
  background: #ffffff;
}
.mode-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.mode-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.upload-box {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.4s;
}
.upload-box:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
}
.upload-box h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.upload-box.is-hidden {
  display: none;
}

.action-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.btn-action {
  padding: 0.7rem 1.8rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-action:hover {
  background: #f1f5f9;
}

textarea {
  flex: 1;
  width: 100%;
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #f8fafc;
  resize: vertical;
  min-height: 140px;
  transition: all 0.3s;
}
textarea:focus {
  outline: none;
  border-color: #94a3b8;
  background: #ffffff;
}

.file-status {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.advanced-settings {
  padding: 0.5rem 0;
}
summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
summary::before {
  content: "▾";
  font-size: 0.8rem;
}
.intent-box {
  margin-top: 1.5rem;
}

.execution-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.btn-primary {
  width: 100%;
  padding: 1.4rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 100px; /* 极简的胶囊状按钮 */
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s;
  letter-spacing: 2px;
}
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  height: 100%;
}
.result-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-header h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
}
.result-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 15%; /* 调整到中上部 */
  align-items: center;
  color: var(--text-muted);
  text-align: center;
}

.footer {
  text-align: center;
  padding: 6rem 4rem;
  color: #94a3b8;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; gap: 2rem; }
  .topbar { padding: 1rem 1.5rem; }
  .brand { margin-left: 0; }
  .slogan-wrap { display: none; }
  .hero-section { padding: 6rem 1.5rem 3rem; }
  .hero-section h1 { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .brand-logo { height: 60px; margin-right: -10px; }
  .brand-cn { font-size: 1.6rem; }
  .brand-en { font-size: 0.7rem; }
  
  .hero-section { padding: 4rem 1rem 2rem; }
  .hero-section h1 { font-size: 2rem; line-height: 1.3; }
  .hero-sub { font-size: 1rem; margin-bottom: 2rem; }
  
  .btn-nav { 
    width: 100%; 
    margin: 0.5rem 0; 
    padding: 0.8rem 1.5rem; 
  }
  
  .mode-selector { grid-template-columns: 1fr; }
  .mode-btn { padding: 1.2rem; }
  
  .upload-box { padding: 1.5rem; }
  .action-row { 
    flex-direction: column; 
    gap: 1rem; 
    align-items: stretch;
  }
  .or-divider { text-align: center; }
  
  .btn-primary { font-size: 1.1rem; padding: 1.2rem; }
  
  .result-header { padding: 1.5rem; }
  .result-header h2 { font-size: 1.3rem; }
  .result-content { padding: 1.5rem; }
  
  .footer { padding: 4rem 1.5rem; }
}
