@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&family=Outfit:wght@300;400;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- Theme System --- */
:root {
  /* Common variables */
  --font-title: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);
  
  --danger: #f43f5e;
  --danger-light: rgba(244, 63, 94, 0.15);
  --danger-border: rgba(244, 63, 94, 0.3);
  
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  
  --card-radius: 24px;
  --btn-radius: 16px;
  
  /* Light Theme Colors */
  --bg-app: #f1f5f9;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(224, 231, 255, 0.5) 0px, transparent 50%),
                 radial-gradient(at 50% 0%, rgba(244, 63, 94, 0.05) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.6);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --border-light: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  --item-hover-bg: rgba(79, 70, 229, 0.05);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --bg-app: #090d16;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(30, 27, 75, 0.6) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(46, 16, 101, 0.5) 0px, transparent 50%),
                 radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.9) 0px, transparent 50%);
  --card-bg: rgba(17, 24, 39, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #090d16;
  --border-light: rgba(51, 65, 85, 0.5);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --item-hover-bg: rgba(124, 58, 237, 0.15);
}

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* --- Container Mockup on Desktop, Full on Mobile --- */
.app-viewport {
  width: 100%;
  max-width: 680px; /* Centered mobile format container */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* --- Header Section --- */
header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--primary-glow);
  font-family: var(--font-title);
}

.logo-text h1 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
  background: var(--border-light);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* --- Layout Main --- */
main {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.view-section {
  display: none;
  flex-direction: column;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.view-section.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- View 1: Dashboard (首页) --- */
.stats-card {
  background: var(--primary-gradient);
  border-radius: var(--card-radius);
  padding: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px var(--primary-glow);
  margin-bottom: 24px;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 500;
}

.progress-overall-container {
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #ffffff;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode Quick Grid */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.mode-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.mode-card:active {
  transform: translateY(0);
}

.mode-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.mode-details h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.mode-details p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Chapter List Heading */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-title h2 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
}

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

/* Chapter Items */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chapter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chapter-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: var(--item-hover-bg);
}

.chapter-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chapter-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.chapter-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.chapter-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.chapter-card:hover .chapter-action-icon {
  background: var(--primary-gradient);
  color: #fff;
  transform: translateX(2px);
}

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

.chapter-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.chapter-progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.chapter-progress-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
}

/* --- View 2: Practice View (刷题页) --- */
.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.practice-title-info {
  text-align: center;
}

.practice-title-info h2 {
  font-size: 14px;
  font-weight: 700;
}

.practice-title-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.mode-switches {
  display: flex;
  background: var(--border-light);
  padding: 4px;
  border-radius: 20px;
  gap: 4px;
}

.mode-switch-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-switch-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .mode-switch-btn.active {
  background: #1e293b;
  color: #ffffff;
}

.question-card-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.question-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.q-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.q-type-badge.single {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

.q-type-badge.multi {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.q-type-badge.judge {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.api-status-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.api-status-badge.cached {
  color: var(--warning);
}

.api-status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.question-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 24px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  width: 100%;
  border: 1px solid var(--border-light);
  background: transparent;
  padding: 14px 16px;
  border-radius: var(--btn-radius);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
}

.option-item:hover {
  background: var(--border-light);
  transform: scale(1.01);
}

.option-prefix {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.option-text {
  font-size: 13.5px;
  line-height: 1.4;
  margin-top: 3px;
}

/* Option States */
.option-item.selected {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

.option-item.selected .option-prefix {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}

.option-item.correct {
  background: var(--success-light) !important;
  border-color: var(--success) !important;
}

.option-item.correct .option-prefix {
  background: var(--success) !important;
  color: #fff !important;
  border-color: var(--success) !important;
}

.option-item.incorrect {
  background: var(--danger-light) !important;
  border-color: var(--danger) !important;
}

.option-item.incorrect .option-prefix {
  background: var(--danger) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
}

/* Submit Multi Button */
.submit-multi-btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--btn-radius);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all 0.2s ease;
}

.submit-multi-btn.show {
  display: block;
}

.submit-multi-btn:hover {
  transform: translateY(-2px);
}

/* Explanation / Answer Panel */
.explanation-panel {
  margin-top: 24px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: none;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.explanation-panel.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.explanation-header {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.explanation-answer {
  background: var(--success-light);
  border: 1px solid var(--success-border);
  color: var(--success);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.explanation-api-log {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 10px;
  border-radius: 8px;
  word-break: break-all;
  font-family: monospace;
}

/* Practice Footer Nav Bar */
.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.control-bar .nav-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.control-bar .nav-btn:hover {
  background: var(--border-light);
}

.control-bar .nav-btn.primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.control-bar .nav-btn.primary:hover {
  transform: translateY(-1px);
}

.control-bar .sheet-trigger {
  flex: 0 0 50px;
  width: 50px;
  height: 46px;
  border-radius: var(--btn-radius);
}

/* --- Answer Sheet (答题卡) Drawer --- */
.sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.sheet-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75%;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet-drawer.show {
  transform: translateY(0);
}

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

.sheet-header h3 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
}

.sheet-legend {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.correct { background: var(--success); }
.legend-dot.incorrect { background: var(--danger); }
.legend-dot.unanswered { background: var(--border-light); }

.sheet-grid-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.sheet-q-num {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheet-q-num:hover {
  background: var(--border-light);
}

.sheet-q-num.correct {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.sheet-q-num.incorrect {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

.sheet-q-num.current {
  border-color: #8b5cf6;
  border-width: 2px;
}

/* --- View 3: Mock Exam --- */
.exam-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: var(--btn-radius);
  margin-bottom: 20px;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.exam-timer {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--danger);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.submit-exam-btn {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-exam-btn:hover {
  background: #e11d48;
}

/* Exam Result Card */
.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 8px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
}

.score-circle.pass {
  border-color: var(--success);
}

.score-circle.fail {
  border-color: var(--danger);
}

.score-val {
  font-family: var(--font-title);
  font-size: 40px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.score-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.result-status {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-status.pass { color: var(--success); }
.result-status.fail { color: var(--danger); }

.result-details {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.result-actions button {
  flex: 1;
  padding: 14px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-light);
  font-weight: 600;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.result-actions button.primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
}

/* --- Toast Notifications --- */
.toast-container {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
             toastOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2.2s forwards;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .toast {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

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

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
