/* ========================================
   AI 概念解释器 - 全局样式
   ======================================== */

/* CSS 变量 */
:root {
  --bg-primary: #06060b;
  --bg-secondary: #0d0d15;
  --bg-tertiary: #13131f;
  --bg-card: rgba(18, 18, 30, 0.85);
  --bg-card-hover: rgba(25, 25, 42, 0.9);
  --bg-glass: rgba(15, 15, 28, 0.7);

  --text-primary: #eaeaf0;
  --text-secondary: #8888a8;
  --text-muted: #55556a;

  --accent: #7c5cfc;
  --accent-light: #a594fd;
  --accent-dark: #5a3fd6;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --accent-subtle: rgba(124, 92, 252, 0.08);

  --gradient-primary: linear-gradient(135deg, #7c5cfc 0%, #00c9db 100%);
  --gradient-secondary: linear-gradient(135deg, #7c5cfc 0%, #f76dbc 100%);
  --gradient-text: linear-gradient(135deg, #a594fd 0%, #5ee7f5 100%);

  --border: rgba(255, 255, 255, 0.05);
  --border-active: rgba(124, 92, 252, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --sidebar-width: 300px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   背景装饰
   ======================================== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.15) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 201, 219, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  animation-delay: -7s;
}

.bg-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(247, 109, 188, 0.08) 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(15px, 10px) scale(1.02);
  }
}

/* ========================================
   应用布局
   ======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 100;
  transition: transform var(--transition-smooth);
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 搜索栏 */
.sidebar-search {
  padding: 16px 16px 12px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
  padding: 0 12px 0 36px;
  outline: none;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* 导航列表 */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-count {
  background: var(--accent-subtle);
  color: var(--accent-light);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-list {
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item .nav-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item .nav-item-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent-light);
}

.nav-item-text {
  flex: 1;
  min-width: 0;
}

.nav-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-item-delete {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-item:hover .nav-item-delete {
  opacity: 1;
}

.nav-item-delete:hover {
  background: rgba(255, 80, 80, 0.15);
  color: #ff5050;
}

.nav-item-delete svg {
  width: 14px;
  height: 14px;
}

/* 空状态 */
.nav-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.nav-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.nav-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.nav-empty span {
  font-size: 12px;
  color: var(--text-muted);
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.settings-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.settings-btn svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 40px;
}

/* ========================================
   欢迎区域
   ======================================== */
.welcome-section {
  max-width: 800px;
  margin: 0 auto;
}

.welcome-hero {
  text-align: center;
  padding: 60px 0 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-active);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -1.5px;
  animation: fadeInDown 0.6s ease 0.1s both;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
  animation: fadeInDown 0.6s ease 0.2s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   查询卡片
   ======================================== */
.query-card {
  animation: fadeInUp 0.6s ease 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.query-input-group {
  margin-bottom: 16px;
}

.query-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 20px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(20px);
}

.query-input-wrapper:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-md);
}

.query-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-right: 14px;
}

#conceptInput {
  flex: 1;
  height: 52px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

#conceptInput::placeholder {
  color: var(--text-muted);
}

.query-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.query-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.query-btn:active {
  transform: translateY(0);
}

.query-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.query-btn svg {
  width: 18px;
  height: 18px;
}

.query-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.hint-label {
  font-size: 13px;
  color: var(--text-muted);
}

.hint-tag {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hint-tag:hover {
  border-color: var(--border-active);
  color: var(--accent-light);
  background: var(--accent-subtle);
}

/* ========================================
   加载状态
   ======================================== */
.loading-section {
  margin-top: 48px;
}

.loading-card {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.4s ease;
}

.loading-spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: spinnerRotate 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: var(--accent);
  animation-duration: 1.2s;
}

.spinner-ring:nth-child(2) {
  inset: 6px;
  border-right-color: var(--accent-light);
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  inset: 12px;
  border-bottom-color: #00c9db;
  animation-duration: 2.2s;
}

@keyframes spinnerRotate {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.loading-text span {
  color: var(--accent-light);
}

.loading-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========================================
   结果展示
   ======================================== */
.result-section {
  margin-top: 48px;
  animation: fadeInUp 0.5s ease;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.result-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-title-group h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.result-badge {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-subtle);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.result-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.result-link:hover {
  color: var(--accent-light);
  border-color: var(--border-active);
}

.result-link svg {
  width: 16px;
  height: 16px;
}

.result-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* iframe 预览样式 */
.result-iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* ========================================
   错误提示
   ======================================== */
.error-section {
  margin-top: 48px;
  animation: fadeInUp 0.4s ease;
}

.error-card {
  text-align: center;
  padding: 40px;
  background: rgba(255, 80, 80, 0.05);
  border: 1px solid rgba(255, 80, 80, 0.15);
  border-radius: var(--radius-xl);
}

.error-card svg {
  width: 48px;
  height: 48px;
  color: #ff5050;
  margin-bottom: 16px;
}

.error-card p {
  font-size: 16px;
  font-weight: 600;
  color: #ff7070;
  margin-bottom: 8px;
}

.error-detail {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  max-width: 500px;
  margin: 0 auto;
  word-break: break-all;
}

/* ========================================
   设置弹窗
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 80, 80, 0.1);
  color: #ff5050;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

/* 表单样式 */
.settings-form {
  padding: 24px 28px 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.form-group textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.toggle-password:hover {
  color: var(--text-primary);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.btn-test {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid rgba(0, 201, 219, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(0, 201, 219, 0.08);
  color: #5ee7f5;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-test:hover {
  background: rgba(0, 201, 219, 0.15);
  border-color: rgba(0, 201, 219, 0.5);
  box-shadow: 0 0 16px rgba(0, 201, 219, 0.15);
}

.btn-test:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(94, 231, 245, 0.3);
  border-top-color: #5ee7f5;
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
}

/* ========================================
   移动端菜单按钮
   ======================================== */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* ========================================
   Toast 通知
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  z-index: 2000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: linear-gradient(135deg, #00b894, #00cec9);
}

.toast.error {
  background: linear-gradient(135deg, #e17055, #d63031);
}

.toast.info {
  background: var(--gradient-primary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* ========================================
   响应式适配
   ======================================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 60px 20px 40px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .result-content {
    padding: 24px 20px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .query-btn span {
    display: none;
  }

  .query-btn {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .query-hints {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    border-radius: var(--radius-lg);
  }
}