/* ==========================================================================
   Image Studio - Creative Utility Design System
   ========================================================================== */

:root {
  /* Color Palette - Dark Slate & Cobalt Theme (Default) */
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #2d3748;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-hover: rgba(255, 255, 255, 0.16);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Light Theme Overrides */
html.light-theme {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;
  --border-hover: rgba(0, 0, 0, 0.18);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-emerald-subtle: rgba(16, 185, 129, 0.15);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

html.light-theme .app-header {
  background-color: rgba(255, 255, 255, 0.85);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-main) 60%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
}

/* Global Header Navigation */
.app-nav {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

html.light-theme .app-nav {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-hover);
}

.nav-tab.active {
  color: #ffffff;
  background-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

html.light-theme .nav-tab {
  color: var(--text-muted);
}

html.light-theme .nav-tab:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

html.light-theme .nav-tab.active {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-surface);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.stat-label {
  color: var(--text-dim);
}

.stat-val {
  font-weight: 600;
  font-family: var(--font-mono);
}

.stat-val.highlight {
  color: var(--accent-emerald);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Button & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-hover);
}

.btn-icon {
  padding: 0.55rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms ease;
}

.btn-icon:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-hover);
  border-color: var(--border-hover);
}

/* Main Layout Grid */
.main-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  flex: 1;
}

/* Sidebar Settings Panel */
.settings-panel {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 5rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mode Switcher Tabs */
.mode-tabs-wrapper {
  display: flex;
  background-color: var(--bg-surface-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.mode-tab {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 150ms ease;
}

.mode-tab.active {
  background-color: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Form Settings Blocks */
.setting-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label-group {
  display: flex;
  flex-direction: column;
}

.setting-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.setting-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.form-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.form-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  transition: 200ms;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 200ms;
}

input:checked + .toggle-slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.input-with-unit {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.65rem;
  gap: 0.35rem;
}

.input-with-unit input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  width: 70px;
}

.input-unit {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Preset Buttons */
.preset-group {
  display: flex;
  gap: 0.4rem;
}

.size-preset-btn {
  flex: 1;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: 150ms;
}

.size-preset-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}

/* Sliders */
.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-val-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
  transition: transform 150ms;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.form-select {
  width: 100%;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* Workspace Area */
.workspace-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Dropzone */
.dropzone-card {
  background-color: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.dropzone-card:hover,
.dropzone-card.drag-active {
  border-color: var(--accent-primary);
  background-color: rgba(59, 130, 246, 0.04);
}

.dropzone-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  transition: transform 200ms;
}

.dropzone-card:hover .dropzone-icon-circle {
  transform: translateY(-3px) scale(1.05);
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.dropzone-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.format-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.tag-capsule {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

/* Queue List Container */
.queue-container {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 320px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.queue-title {
  font-size: 1rem;
  font-weight: 700;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem;
  color: var(--text-dim);
  gap: 0.75rem;
  font-size: 0.9rem;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Item Card */
.queue-item-card {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  gap: 1rem;
  transition: all 180ms ease;
}

.queue-item-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-surface-hover);
}

.item-thumb-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.format-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.format-badge.transform-badge {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-saved {
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-skipped {
  background-color: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-pending {
  background-color: rgba(148, 163, 184, 0.15);
  color: var(--text-dim);
}

.status-processing {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

.status-completed {
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
}

.status-skipped {
  background-color: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.status-error {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.action-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 150ms ease;
}

.action-btn:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.action-btn.remove-btn:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Spinner Animation */
.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Comparison Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 1080px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  overflow: auto;
  flex: 1;
}

/* Comparator Viewport */
.comparator-wrapper {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 480px;
  background-color: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  border: 1px solid var(--border-subtle);
}

.comparator-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.comparator-layer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 150ms ease-out;
}

.layer-badge {
  position: absolute;
  top: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  z-index: 10;
}

.layer-badge.left {
  left: 1rem;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
}

.layer-badge.right {
  right: 1rem;
  background-color: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}

.split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background-color: #ffffff;
  cursor: ew-resize;
  z-index: 20;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.split-handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.zoom-controls {
  display: flex;
  gap: 0.4rem;
  background-color: var(--bg-surface-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.zoom-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.zoom-btn.active {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.modal-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  background-color: var(--bg-surface-elevated);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.4rem;
}

.pill-label {
  color: var(--text-dim);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-message {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  animation: slideUp 200ms ease-out;
  transition: opacity 300ms ease, transform 300ms ease;
}

.toast-message.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.opacity-40 {
  opacity: 0.4;
  pointer-events: none;
}

.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }

/* Responsive Rules (AGENTS.md 4.9.1) */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  .settings-panel {
    position: static;
  }
  .header-stats {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }
  .nav-tab span {
    display: none;
  }
  .nav-tab {
    padding: 0.4rem 0.6rem;
  }
  .main-container {
    padding: 1rem;
    gap: 1rem;
  }
  .comparator-wrapper {
    height: 320px;
  }
  .modal-stats {
    flex-direction: column;
    width: 100%;
  }
  .stat-pill {
    justify-content: space-between;
  }
}
