/* ========== 1. 主题变量（完整保留） ========== */
:root {
  --bg: #F1F1F1;
  --bg-card: #f5f5f5;
  --bg-input: #fafafa;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #000000;
  --accent-text: #ffffff;
  --result-border: #e0e0e0;
  --copy-border: #cccccc;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-input: #0f0f0f;
  --border: #2a2a2a;
  --text: #e5e5e5;
  --text-secondary: #a0a0a0;
  --text-muted: #525252;
  --accent: #ffffff;
  --accent-text: #000000;
  --result-border: #2a2a2a;
  --copy-border: #333333;
}

/* ========== 2. 重置 & 全局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 24px 16px;
  max-width: 680px;
  margin: 0 auto;
  transition: background 0.2s, color 0.2s;
}

/* ========== 3. 顶部栏（语言切换 + 主题按钮） ========== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.lang-bar {
  display: flex;
  gap: 6px;
}

.lang-bar button,
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-bar button.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.theme-btn {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== 4. 模式切换标签（如果你新页面不需要，直接删掉这段） ========== */
.mode-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.mode-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
}

.mode-tab.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* ========== 5. 通用工具类 ========== */
.section { display: none; }
.section.active { display: block; }

.label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 600;
}

.sublabel {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ========== 6. 输入框 & 按钮（核心复用） ========== */
textarea,
input[type="text"],
input[type="search"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

textarea:focus,
input:focus {
  border-color: var(--text-muted);
}

textarea::placeholder,
input::placeholder {
  color: var(--text-muted);
}

/* 尺寸变体（按需使用） */
.box-small { min-height: 80px; margin-bottom: 16px; }
.box-large { min-height: 160px; margin-bottom: 12px; }

/* 全宽主按钮 */
.btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.998); }

/* ========== 7. 卡片容器（通用） ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  margin-top: 16px;
}

/* ========== 8. Loading 动画占位 ========== */
.loading {
  display: none;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}
.loading.show { display: block; }
