/* === CSS Custom Properties (Theme) === */
:root {
  --primary: #0F766E;
  --primary-hover: #0D6B63;
  --primary-light: rgba(15, 118, 110, 0.1);
  --bg: #f5f7fa;
  --bg-alt: #eef1f5;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #0F766E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --transition: 0.2s ease;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
}

[data-theme="dark"] {
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --primary-light: rgba(20, 184, 166, 0.15);
  --bg: #0f172a;
  --bg-alt: #1a2332;
  --surface: #1e293b;
  --surface-hover: #273548;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-focus: #14b8a6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
  --warning-bg: #3d3200; --warning-text: #fbbf24; --warning-border: #856404;
  --danger-bg: #3d1010; --danger-text: #f87171; --danger-border: #991b1b;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }

/* === Header === */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}

.header__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header__logo {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text); font-weight: 700; font-size: 1.2rem;
}

.header__logo-icon { width: 28px; height: 28px; color: var(--primary); }

.header__nav { display: flex; align-items: center; gap: 0.25rem; }

.header__nav-link {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition);
}

.header__nav-link:hover { color: var(--primary); background: var(--primary-light); }

.header__nav-link--active { color: var(--primary); background: var(--primary-light); }

.header__theme-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem; cursor: pointer; font-size: 1.1rem;
  transition: transform 0.5s ease; margin-left: 0.5rem;
}
.header__theme-btn:hover { transform: rotate(15deg) scale(1.1); }

.header__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}

.header__hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}

/* === Main & Page === */
.main { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1rem; min-height: calc(100vh - 120px); }

/* === Home Page === */
.home__hero { text-align: center; padding: 2rem 0 2.5rem; }

.home__title {
  font-size: 2.25rem; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroFadeIn 0.8s ease forwards;
}

.home__subtitle {
  color: var(--text-secondary); margin-top: 0.5rem; font-size: 1.1rem;
  opacity: 0; animation: heroFadeIn 0.6s 0.3s ease forwards;
}

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

.home__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.home__card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  opacity: 0; animation: cardSlideUp 0.5s ease forwards;
}
.home__card:nth-child(1) { animation-delay: 0.05s; }
.home__card:nth-child(2) { animation-delay: 0.1s; }
.home__card:nth-child(3) { animation-delay: 0.15s; }
.home__card:nth-child(4) { animation-delay: 0.2s; }
.home__card:nth-child(5) { animation-delay: 0.25s; }
.home__card:nth-child(6) { animation-delay: 0.3s; }
.home__card:nth-child(7) { animation-delay: 0.35s; }
.home__card:nth-child(8) { animation-delay: 0.4s; }
.home__card:nth-child(9) { animation-delay: 0.45s; }

.home__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

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

.home__card-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.home__card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text); }

.home__card-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

/* === Shared Components === */
.page { animation: fadeIn 0.25s ease; }

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

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.card__header { margin-bottom: 1.25rem; }

.card__title {
  font-size: 1.25rem; font-weight: 700;
  opacity: 0; animation: cardFadeIn 0.5s ease forwards;
}

.card__subtitle {
  color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.25rem;
  opacity: 0; animation: cardFadeIn 0.5s 0.1s ease forwards;
}
.card__privacy {
  color: var(--primary); font-size: 0.75rem; margin-top: 0.25rem; opacity: 0;
  animation: cardFadeIn 0.5s 0.15s ease forwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-alt);
}

.upload-area:hover, .upload-area--drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.01);
}

.upload-area__icon {
  font-size: 3rem; margin-bottom: 0.75rem;
  display: inline-block;
  animation: uploadPulse 2s ease-in-out infinite;
}

@keyframes uploadPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.upload-area__text { color: var(--text-secondary); font-size: 0.95rem; }

.upload-area__hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem; font-size: 0.875rem; font-weight: 500;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.15s ease; text-decoration: none;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(0.96); }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3); }

.btn--secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--border); transform: translateY(-1px); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.btn--block { width: 100%; justify-content: center; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Form Controls */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block; font-size: 0.875rem; font-weight: 500;
  margin-bottom: 0.35rem; color: var(--text);
}

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.6rem 0.75rem;
  font-size: 0.875rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); transition: border-color var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 120px; }

.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.push-pull-warning {
  margin-top: 0.5rem; padding: 0.5rem 0.75rem;
  font-size: 0.8rem; line-height: 1.4;
  background: var(--warning-bg, #fff3cd); color: var(--warning-text, #856404);
  border: 1px solid var(--warning-border, #ffc107); border-radius: 6px;
}
.push-pull-warning--danger {
  background: var(--danger-bg, #fce4e4); color: var(--danger-text, #a71d2a);
  border-color: var(--danger-border, #dc3545);
}

/* Range Slider */
.form-range {
  -webkit-appearance: none; width: 100%; height: 6px;
  background: var(--border); border-radius: 3px; outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%; cursor: pointer;
}

.form-range::-moz-range-thumb {
  width: 18px; height: 18px; background: var(--primary);
  border-radius: 50%; cursor: pointer; border: none;
}

/* Checkbox Toggle */
.toggle { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.toggle__track {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--border); position: relative; transition: all var(--transition);
}
.toggle__track--on { background: var(--primary); }
.toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle__track--on .toggle__thumb { left: 20px; }

/* Toolbar */
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; padding: 1rem 0; }

/* Canvas Container */
.canvas-container {
  position: relative; overflow: auto; max-height: 60vh;
  background: repeating-conic-gradient(var(--bg-alt) 0% 25%, transparent 0% 50%) 50% / 20px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; min-height: 200px;
}

.canvas-container canvas { max-width: 100%; display: block; }

/* Grid (for result cards) */
.grid { display: grid; gap: 1rem; }

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid--masonry {
  display: block;
  column-count: 2;
  column-gap: 1rem;
}
.grid--masonry > * {
  break-inside: avoid;
  margin-bottom: 1rem;
}

/* Split Grid Preview */
.split-grid { display: grid; gap: 2px; }
.split-grid__cell { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s ease; }
.split-grid__cell:hover { border-color: var(--primary); transform: scale(1.03); z-index: 1; box-shadow: var(--shadow-lg); }
.split-grid__cell-num {
  position: absolute; top: 2px; left: 2px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 0.7rem; padding: 1px 5px; border-radius: 3px;
}

/* Film Cards */
.film-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  transition: all 0.25s ease; cursor: default;
  opacity: 0; animation: cardSlideUp 0.4s ease forwards;
}

.film-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }

.film-card__brand { font-size: 0.75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; }

.film-card__film { font-size: 1.05rem; font-weight: 700; margin: 0.25rem 0; }

.film-card__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.8rem; }

.film-card__tag {
  display: inline-block; padding: 0.15rem 0.5rem;
  background: var(--primary-light); color: var(--primary);
  border-radius: 100px; font-size: 0.75rem;
}

.film-card__formats {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem;
}

.film-card__format {
  display: inline-block; padding: 0.25rem 0.6rem;
  background: var(--bg-alt); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.78rem; white-space: nowrap;
}

.film-card__actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; }
.film-card__notes { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; padding: 0.4rem 0.5rem; background: var(--bg-alt); border-radius: 4px; line-height: 1.5; white-space: pre-line; word-break: break-all; }
.film-card__note-link { color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.film-card__note-link:hover { color: var(--primary); }

/* Note detail modal */
.note-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.note-modal { background: var(--surface); border-radius: 12px; max-width: 640px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.note-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.note-modal__title { font-size: 1rem; font-weight: 700; margin: 0; }
.note-modal__close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-muted); padding: 0.25rem; line-height: 1; }
.note-modal__close:hover { color: var(--text); }
.note-modal__body { padding: 1.25rem; overflow-y: auto; font-size: 0.82rem; line-height: 1.7; color: var(--text); }
.note-modal__body h3 { font-size: 1rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.note-modal__body h3:first-child { margin-top: 0; }
.note-modal__body p { margin: 0.3rem 0; }
.note-modal__body .note-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.75rem; line-height: 1.5; }
.note-modal__body .note-table th, .note-modal__body .note-table td { padding: 0.25rem 0.5rem; border: 1px solid var(--border); text-align: left; }
.note-modal__body .note-table th { background: var(--bg-alt); font-weight: 700; white-space: nowrap; }
.note-modal__body .note-formula { background: var(--bg-alt); padding: 0.6rem 0.9rem; border-radius: 6px; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; margin: 0.5rem 0; white-space: pre; overflow-x: auto; }
.note-modal__body .note-section { font-weight: 700; color: var(--primary); margin: 0.75rem 0 0.25rem; font-size: 0.85rem; }
.note-modal__body .note-hint { font-size: 0.75rem; color: var(--text-muted); margin: 0.25rem 0; }

.format-option--selected { border-color: var(--primary) !important; background: var(--primary-light); }

/* Timer */
.timer-display {
  font-size: 6rem; font-weight: 800; text-align: center;
  font-family: var(--font-mono); letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}

.timer-display--warning { color: var(--warning); animation: timerUrgent 0.5s ease-in-out infinite; }
.timer-display--danger { color: var(--danger); animation: timerUrgent 0.3s ease-in-out infinite; }

@keyframes timerUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-step {
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); transition: all var(--transition);
  background: var(--surface);
}

.timer-step--active { border-color: var(--primary); background: var(--primary-light); }
.timer-step--done { border-color: var(--success); opacity: 0.7; }
.timer-step--clickable { cursor: pointer; }
.timer-step--clickable:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-light); }

.timer-step__name { font-weight: 600; font-size: 0.9rem; }
.timer-step__time { font-size: 0.8rem; color: var(--text-secondary); }

.timer-step__drag-handle {
  flex-shrink: 0; cursor: grab; color: var(--text-muted);
  font-size: 1rem; letter-spacing: -2px; user-select: none;
  padding: 0 2px; line-height: 1;
}
.timer-step__drag-handle:active { cursor: grabbing; }
.timer-step--dragging { opacity: 0.4; }
.timer-step--drag-over {
  border-color: var(--primary) !important;
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Progress bar */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s linear; }

/* Flash overlay */
.flash-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255,255,255,0.8); pointer-events: none;
  animation: flash 0.5s ease-out;
}

[data-theme="dark"] .flash-overlay { background: rgba(255,255,255,0.3); }

@keyframes flash {
  0% { opacity: 1; } 100% { opacity: 0; }
}

/* Toast */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; }

.toast {
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--info { background: var(--primary); }
.toast--warning { background: #e8900c; color: #fff; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Filter row */
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; }
.filter-row .form-group { margin-bottom: 0; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: 0; }

.tabs__tab {
  padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; border: none;
  background: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--transition);
}

.tabs__tab:hover { color: var(--text); }
.tabs__tab--active { color: var(--primary); border-bottom-color: var(--primary); }

/* Map */
.exif-map { height: 300px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }

/* Film Index */
.film-index-preview {
  display: grid; gap: 4px; background: #1a1a1a;
  padding: 16px; border-radius: var(--radius-sm);
}

/* === Footer === */
.footer {
  text-align: center; padding: 1.5rem; color: var(--text-muted);
  font-size: 0.8rem; border-top: 1px solid var(--border);
}

/* === Empty State === */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }

.empty-state__icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* === Loading Spinner === */
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

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

/* === Responsive === */
@media (max-width: 768px) {
  .header__hamburger { display: flex; }

  .header__nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 0.5rem 1rem; box-shadow: var(--shadow-lg);
  }

  .header__nav--open { display: flex; }

  .header__nav-link { width: 100%; padding: 0.75rem 0.5rem; }

  .header__theme-btn { margin: 0.5rem 0; }

  .home__title { font-size: 1.75rem; }

  .home__grid { grid-template-columns: 1fr; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--masonry { column-count: 2; }

  .timer-display { font-size: 4rem; }

  .filter-row { flex-direction: column; }
  .filter-row .form-group { flex: none; width: 100%; }

  .form-row { flex-direction: column; }
  .form-row > * { flex: none; }
}

@media (max-width: 480px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--masonry { column-count: 1; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn { justify-content: center; }
}

/* === Misc === */
hr { border: none; border-top: 1px solid var(--border); }

optgroup { font-weight: 600; color: var(--text-muted); }

/* Alarm Overlay */
.alarm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}

.alarm-overlay__box {
  background: var(--surface); border-radius: var(--radius);
  padding: 2.5rem 2rem; text-align: center;
  max-width: 400px; width: 90%;
  box-shadow: var(--shadow-lg);
  animation: alarmPulse 1s ease-in-out infinite;
}

.alarm-overlay__icon { font-size: 3rem; margin-bottom: 0.75rem; }

.alarm-overlay__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }

.alarm-overlay__sub { font-size: 0.95rem; color: var(--text-secondary); }

@keyframes alarmPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

/* Dilution Result */
.dilution-result-value {
  display: inline-block;
  animation: dilutionPopIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes dilutionPopIn {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: scale(1); }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
