/* Speed Reader - Light/Dark Theme Support */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== THEME VARIABLES ===== */

:root {
  /* Claude Brand - Always the same */
  --accent: #D97757;
  --accent-light: #E8957A;
  --accent-dark: #C45D3E;
  --success: #10B981;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (default) */
[data-theme="dark"] {
  --bg: #0A0A09;
  --bg-raised: #141312;
  --bg-elevated: #1C1B1A;
  --bg-overlay: rgba(0, 0, 0, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-subtle: rgba(255, 255, 255, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: rgba(217, 119, 87, 0.15);
}

/* Light Theme */
[data-theme="light"] {
  --bg: #FAFAF9;
  --bg-raised: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(255, 255, 255, 0.8);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text: #1A1915;
  --text-muted: rgba(0, 0, 0, 0.6);
  --text-subtle: rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glow: rgba(217, 119, 87, 0.1);
}

/* ===== BASE STYLES ===== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  color-scheme: light dark;
}

body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

/* App Layout */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .app {
  background: 
    radial-gradient(ellipse at 20% 0%, var(--glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(217, 119, 87, 0.05) 0%, transparent 50%),
    var(--bg);
}

[data-theme="light"] .app {
  background: 
    radial-gradient(ellipse at 20% 0%, var(--glow) 0%, transparent 40%),
    var(--bg);
}

/* ===== TOPBAR ===== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.3);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-subtle);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--bg-raised);
  border-color: var(--border-hover);
  color: var(--text);
}

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

/* Theme Toggle */
.theme-toggle {
  position: relative;
}

.theme-toggle .sun {
  display: none;
}

.theme-toggle .moon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun {
  display: block;
}

[data-theme="light"] .theme-toggle .moon {
  display: none;
}

/* Social buttons */
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--bg-raised);
  border-color: var(--border-hover);
  color: var(--text);
}

.social-btn svg {
  width: 16px;
  height: 16px;
}


/* ===== MAIN CONTENT ===== */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.view {
  width: 100%;
  max-width: 520px;
}

.hidden {
  display: none !important;
}

/* ===== HOME VIEW ===== */

.home-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-hero {
  text-align: center;
  margin-bottom: 8px;
}

.home-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.home-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* Extension CTA */
.extension-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(217, 119, 87, 0.08);
  border: 1px solid rgba(217, 119, 87, 0.2);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s var(--ease);
}

.extension-cta:hover {
  background: rgba(217, 119, 87, 0.12);
  border-color: rgba(217, 119, 87, 0.3);
}

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

.extension-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.extension-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.extension-title {
  font-size: 13px;
  font-weight: 600;
}

.extension-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.extension-arrow {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* Mode Selection */
.mode-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  text-align: left;
}

.mode-card:hover {
  border-color: var(--border-hover);
}

.mode-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.mode-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.mode-card.active .mode-icon {
  background: rgba(217, 119, 87, 0.12);
  color: var(--accent);
}

.mode-icon svg {
  width: 18px;
  height: 18px;
}

.mode-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mode-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

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

/* Input Sections */
.input-section,
.preset-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-input {
  width: 100%;
  height: 120px;
  padding: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  transition: all 0.2s var(--ease);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}

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

.input-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-subtle);
}

/* Preset List */
.preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
}

.preset:hover {
  border-color: var(--border-hover);
}

.preset.active {
  border-color: var(--accent);
  background: rgba(217, 119, 87, 0.06);
}

.preset-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.preset-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Training Section */
.training-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.training-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s var(--ease);
}

.training-toggle:has(.toggle-input:checked) {
  border-color: var(--accent);
  background: rgba(217, 119, 87, 0.06);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--text-subtle);
  border-radius: 12px;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-switch {
  background: var(--accent);
}

.toggle-input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.training-settings {
  padding: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: slideDown 0.2s var(--ease);
}

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

.training-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.training-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
}

.mini-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(217, 119, 87, 0.3);
}

.field-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.training-arrow {
  color: var(--text-subtle);
  flex-shrink: 0;
}

.training-arrow svg {
  width: 18px;
  height: 18px;
}

.training-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.training-info svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Speed Section */
.speed-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.speed-slider,
.live-speed-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
}

.speed-slider::-webkit-slider-thumb,
.live-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(217, 119, 87, 0.4);
  transition: transform 0.1s var(--ease);
}

.speed-slider::-webkit-slider-thumb:hover,
.live-speed-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.speed-display,
.live-speed-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 80px;
}

.speed-value,
.live-speed-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.speed-unit,
.live-speed-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.speed-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-subtle);
}

/* Buttons */
.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: 0 4px 16px rgba(217, 119, 87, 0.3);
}

.btn-start:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 20px rgba(217, 119, 87, 0.4);
}

.btn-start:active {
  transform: scale(0.98);
}

.btn-start svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-light);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

.hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-subtle);
}

.hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== READING VIEW ===== */

.view--read {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.read-metrics {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.read-metric {
  text-align: center;
}

.read-metric-val {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.read-metric-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.read-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.read-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.read-area {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.focus-marker {
  position: absolute;
  left: 50%;
  top: 15%;
  bottom: 15%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.3;
  transform: translateX(-50%);
}

.word-container {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  position: absolute;
}

.word-before,
.word-after {
  color: var(--text);
}

.word-focus {
  color: var(--accent);
}

.read-speed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.training-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(217, 119, 87, 0.12);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.training-badge svg {
  width: 12px;
  height: 12px;
}

.live-speed-slider {
  width: 160px;
}

.read-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.read-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}

.read-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.read-btn svg {
  width: 20px;
  height: 20px;
}

.read-btn--primary {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border: none;
  color: white;
}

.read-btn--primary:hover {
  background: var(--accent-light);
  color: white;
}

/* ===== DONE VIEW ===== */

.done-content {
  text-align: center;
  padding: 20px 0;
}

.done-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  animation: badgePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.done-badge svg {
  width: 36px;
  height: 36px;
  color: white;
}

.done-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.done-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.done-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 28px;
}

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

.done-stat-val {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.done-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.done-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ===== FOOTER ===== */

.footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  transition: border-color 0.3s var(--ease);
}

.footer-content {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.claude-logo {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
}

.footer-link:hover {
  color: var(--text);
  background: var(--bg-raised);
}

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

/* ===== MODALS ===== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  animation: modalIn 0.2s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}

.modal-close:hover {
  background: var(--bg-raised);
  color: var(--text);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-right: 36px;
}

.modal-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-section h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.modal-link:hover {
  text-decoration: underline;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.shortcut kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
  color: var(--text-muted);
  margin-right: 6px;
}

/* Extension Modal */
.ext-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.ext-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ext-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.ext-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.ext-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
}

.ext-step-num {
  width: 24px;
  height: 24px;
  background: rgba(217, 119, 87, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

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

.ext-download {
  width: 100%;
  justify-content: center;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
  .topbar {
    padding: 12px 16px;
  }
  
  .main {
    padding: 24px 16px;
  }
  
  .home-title {
    font-size: 28px;
  }
  
  .mode-select {
    grid-template-columns: 1fr;
  }
  
  .speed-value,
  .live-speed-val {
    font-size: 22px;
  }
  
  .word-container {
    font-size: 36px;
  }
  
  .read-metrics {
    gap: 24px;
  }
  
  .done-stats {
    gap: 20px;
  }
  
  .done-actions {
    flex-direction: column;
  }
}
