/* ================================
   全角半角转换工具 - 自定义样式
   ================================ */

:root {
  --bg: #FAFAF9; --bg-alt: #F5F5F4; --surface: #FFFFFF;
  --border: #E7E5E4; --border-strong: #D6D3D1;
  --text: #1E293B; --text-secondary: #52525B; --text-muted: #71717A;
  --primary: #4F46E5; --primary-hover: #4338CA; --primary-light: rgba(79,70,229,0.08);
  --secondary: #F97316; --accent: #EC4899; --success: #059669;
  --radius: 10px; --radius-lg: 14px; --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04); --shadow: 0 4px 12px rgba(0,0,0,0.06); --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter','Noto Sans SC',system-ui,sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

.toast { position: fixed; top: 24px; right: 24px; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 100px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; z-index: 1000; transform: translateX(calc(100% + 40px)); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.toast.show { transform: translateX(0); }
.toast-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; }
.page { max-width: 960px; margin: 0 auto; padding: 0 32px; }

::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #f1f5f9; } ::-webkit-scrollbar-thumb { background: #A5B4FC; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #4F46E5; }
::selection { background: rgba(79,70,229,0.2); color: #1E293B; }

/* ── Converter ── */
.converter { padding: 32px 0; }

.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { display: flex; align-items: center; gap: 6px; padding: 12px 22px; background: none; border: none; border-bottom: 2px solid transparent; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s ease; margin-bottom: -1px; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--text); border-bottom-color: #3B82F6; font-weight: 600; }
.tab-icon { font-size: 13px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.panel-title { font-size: 16px; font-weight: 700; color: var(--text); }
.panel-badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 100px; }
.panel-badge--cyan { background: rgba(6,182,212,0.08); color: #06B6D4; }
.panel-badge--blue { background: rgba(59,130,246,0.08); color: #3B82F6; }
.panel-body { padding: 20px; }

.input-area { width: 100%; padding: 14px 16px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 16px; color: var(--text); resize: vertical; transition: all 0.2s ease; outline: none; line-height: 1.8; }
.input-area:focus { border-color: #3B82F6; background: var(--surface); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.input-area::placeholder { color: #9CA3AF; }

.input-row-actions { display: flex; gap: 8px; margin-top: 12px; }

.btn-convert { padding: 12px 22px; background: linear-gradient(135deg,#3B82F6,#06B6D4); border: 1px solid transparent; border-radius: 100px; font-family: inherit; font-size: 14px; font-weight: 600; color: white; cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.btn-convert:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-convert:active { transform: translateY(0); }

.btn-now { padding: 8px 16px; background: rgba(79,70,229,0.06); border: 1px solid rgba(79,70,229,0.12); border-radius: 100px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--primary); cursor: pointer; transition: all 0.15s ease; white-space: nowrap; }
.btn-now:hover { background: rgba(79,70,229,0.10); border-color: rgba(79,70,229,0.20); }

.output-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-size: 18px; font-weight: 600; color: var(--text); min-height: 56px; word-break: break-all; line-height: 1.8; }
.output-box.mono { font-family: 'SF Mono','Cascadia Code','Fira Code',monospace; }

.compare-box { margin-top: 10px; padding: 10px 14px; background: rgba(59,130,246,0.04); border: 1px dashed rgba(59,130,246,0.2); border-radius: 8px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; display: none; }
.compare-box.show { display: block; }

.btn-copy-output { display: block; margin-top: 10px; padding: 7px 16px; background: transparent; border: 1px solid var(--border); border-radius: 100px; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s ease; }
.btn-copy-output:hover { background: var(--primary-light); border-color: rgba(79,70,229,0.25); color: var(--primary); }

/* ── Guide ── */
.guide-section { margin-top: 16px; margin-bottom: 64px; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.guide-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 20px; background: none; border: none; cursor: pointer; transition: background 0.15s ease; }
.guide-toggle:hover { background: var(--bg-alt); }
.guide-toggle-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #1E293B; }
.guide-toggle.open .toggle-arrow { transform: rotate(180deg); }
.toggle-arrow { transition: transform 0.2s ease; color: var(--text-muted); }
.guide-list { padding: 0 20px 20px; }
.guide-list.hidden { display: none; }
.guide-item { padding: 16px 0; border-top: 1px solid var(--border); }
.guide-item:first-child { border-top: 1px solid var(--border); }
.guide-item-title { font-size: 14px; font-weight: 600; color: #1E293B; margin-bottom: 6px; }
.guide-item-body { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

@media (max-width: 768px) {
  .page { padding: 0 16px; }
  .input-row-actions { flex-direction: column; }
  .btn-convert, .btn-now { width: 100%; text-align: center; }
}
