/* ==========================================================================
   Pomodoro Timer - Clean Minimal Design
   ========================================================================== */

:root {
  /* Dark Theme - Better readability */
  --bg: #0a0a0a;
  --bg-secondary: #151515;
  --bg-tertiary: #1f1f1f;
  --text: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #737373;
  --accent: #ffffff;
  --success: #22c55e;
  --error: #ef4444;
  --border: #2e2e2e;
  --ring-progress: #ffffff;
  --ring-bg: #2e2e2e;
  --shadow: rgba(0, 0, 0, 0.5);
  --overlay: rgba(0, 0, 0, 0.85);

  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-timer: 4.5rem;

  --z-dropdown: 100;
  --z-modal: 1000;
  --z-toast: 2000;
}

/* Light Theme */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f0f0;
  --text: #0a0a0a;
  --text-secondary: #404040;
  --text-muted: #737373;
  --accent: #0a0a0a;
  --border: #e0e0e0;
  --ring-progress: #0a0a0a;
  --ring-bg: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --overlay: rgba(0, 0, 0, 0.5);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--text); color: var(--bg); }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background var(--transition-slow), color var(--transition-slow);
}

.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: var(--z-dropdown);
  background: var(--bg);
}

.logo {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.header-toggles { display: flex; gap: var(--space-2); }

.toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.toggle-btn:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.toggle-btn.active {
  background: var(--text);
  color: var(--bg);
}

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

/* Main Layout */
.main {
  min-height: 100vh;
  padding: calc(64px + var(--space-6)) var(--space-5) var(--space-8);
}

.main-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-8);
  align-items: start;
}

/* Timer Section */
.timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: var(--space-4);
  min-height: calc(100vh - 200px);
  gap: var(--space-6);
}

.timer-container {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--ring-bg);
  stroke-width: 4;
}

.progress-ring-progress {
  fill: none;
  stroke: var(--ring-progress);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

.timer-container[data-type="short-break"] .progress-ring-progress,
.timer-container[data-type="long-break"] .progress-ring-progress {
  stroke: var(--success);
}

.timer-display { text-align: center; z-index: 1; }

.timer-time {
  display: block;
  font-size: 5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-label {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timer-session {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Session Calendar */
.session-calendar { display: flex; gap: var(--space-3); }

.session-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: transparent;
  transition: all var(--transition);
}

.session-dot.completed { background: var(--text); border-color: var(--text); }
.session-dot.current { border-color: var(--text); }
.session-dot.break { background: var(--success); border-color: var(--success); }

/* Timer Controls */
.timer-controls {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: center;
  width: 320px;
}

.control-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

.control-btn:hover {
  color: var(--text);
  background: var(--bg-tertiary);
}

.control-btn .icon { width: 22px; height: 22px; }

/* Custom Tooltips - use data-tooltip to avoid native browser tooltip */
.control-btn[data-tooltip],
.toggle-btn[data-tooltip],
.add-task-btn[data-tooltip] {
  position: relative;
}

.control-btn[data-tooltip]::after,
.toggle-btn[data-tooltip]::after,
.add-task-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  z-index: var(--z-dropdown);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.control-btn[data-tooltip]:hover::after,
.toggle-btn[data-tooltip]:hover::after,
.add-task-btn[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Focus Tasks (hidden by default) */
.focus-tasks {
  display: none;
  width: 100%;
  max-width: 320px;
  margin-top: var(--space-4);
}

.focus-task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.focus-task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  cursor: pointer;
}

.focus-task-item .task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--text-muted);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.focus-task-item .task-checkbox.checked {
  background: var(--text);
  border-color: var(--text);
}

.focus-task-item .task-checkbox.checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.focus-task-item .task-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.focus-task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Side Section */
.side-section { display: flex; flex-direction: column; gap: var(--space-5); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Task Section */
.task-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--border);
}

.task-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.add-task-form { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }

.task-input {
  flex: 1;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  transition: border-color var(--transition);
}

.task-input::placeholder { color: var(--text-muted); }
.task-input:focus { outline: none; border-color: var(--text-muted); }

.add-task-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.add-task-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-tertiary);
}

/* Task List */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-height: 280px;
  overflow-y: auto;
}

.task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: transparent;
  transition: background var(--transition);
  cursor: pointer;
}

.task-item:hover { background: var(--bg-tertiary); }
.task-item.active { background: var(--bg-tertiary); }

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.task-checkbox:hover { border-color: var(--text-muted); }
.task-checkbox.checked { background: var(--text); border-color: var(--text); }

.task-checkbox.checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.task-text { flex: 1; font-size: var(--text-sm); color: var(--text); word-break: break-word; }
.task-item.completed .task-text { text-decoration: line-through; color: var(--text-muted); }
.task-sessions { font-size: var(--text-xs); color: var(--text-muted); }

.task-actions {
  display: flex;
  gap: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition);
}

.task-item:hover .task-actions { opacity: 1; }

.task-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.task-action-btn:hover { background: var(--bg); color: var(--text); }
.task-action-btn.delete:hover { color: var(--error); }
.task-action-btn .icon { width: 14px; height: 14px; }

.task-edit-input {
  flex: 1;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--text-muted);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
}

.task-edit-input:focus { outline: none; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--space-5);
}

/* Stats Section */
.stats-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
}

.stats-row { display: flex; align-items: center; justify-content: space-between; }

.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-value { font-size: var(--text-lg); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--text-xs); color: var(--text-muted); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* History Section */
.history-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.section-toggle {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0;
}

.section-toggle .section-title { margin: 0; }

.toggle-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.section-toggle[aria-expanded="false"] .toggle-arrow { transform: rotate(-90deg); }

.history-content {
  padding: 0 var(--space-5) var(--space-4);
  max-height: 300px;
  overflow-y: auto;
  transition: max-height var(--transition-slow), padding var(--transition-slow), opacity var(--transition-slow);
}

.history-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
}

.history-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.history-date-group { margin-top: var(--space-4); }
.history-date-group:first-child { margin-top: 0; }

.history-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.history-type { width: 6px; height: 6px; border-radius: var(--radius-full); flex-shrink: 0; }
.history-type.work { background: var(--text); }
.history-type.break { background: var(--success); }
.history-time { color: var(--text-muted); font-size: var(--text-xs); min-width: 45px; }
.history-duration { color: var(--text-secondary); }
.history-task { color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  text-align: center;
  pointer-events: none;
}

.shortcut-hint { font-size: var(--text-xs); color: var(--text-muted); }

.shortcut-hint kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: inherit;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-slow);
}

.modal-overlay.visible .modal { transform: scale(1); }

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

.modal-title { font-size: var(--text-base); font-weight: 600; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--bg-tertiary); color: var(--text); }
.modal-close .icon { width: 18px; height: 18px; }

.modal-body { padding: var(--space-5); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}

/* Settings */
.settings-group { margin-bottom: var(--space-5); }
.settings-group:last-child { margin-bottom: 0; }

.settings-group-title {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: var(--text-sm); color: var(--text-secondary); }

.input-with-suffix { display: flex; align-items: center; gap: var(--space-2); }

.input-with-suffix input {
  width: 60px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  text-align: center;
}

.input-with-suffix input:focus { outline: none; border-color: var(--text-muted); }
.input-suffix { font-size: var(--text-xs); color: var(--text-muted); }

/* Toggle Switch */
.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--border);
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}

.toggle-switch[aria-checked="true"] { background: var(--text); }

.toggle-switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: var(--radius-full);
  transition: transform var(--transition);
}

.toggle-switch[aria-checked="true"] .toggle-switch-slider { transform: translateX(20px); }

/* Buttons */
.btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover { border-color: var(--text-muted); color: var(--text); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--border); }
.btn-danger { color: var(--error); border-color: var(--error); }
.btn-danger:hover { background: var(--error); color: white; }

/* Shortcuts */
.shortcuts-list { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); align-items: center; }

.shortcut-item {
  display: contents;
}

.shortcut-item kbd {
  min-width: 50px;
  padding: var(--space-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-xs);
  text-align: center;
}

.shortcut-item span { color: var(--text-secondary); font-size: var(--text-sm); }

.gestures-info {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: none;
}

.gestures-info h3 {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.gestures-info p { font-size: var(--text-sm); color: var(--text-secondary); }

/* Toast */
.toast-container {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  color: var(--text);
  font-size: var(--text-sm);
  box-shadow: 0 4px 12px var(--shadow);
  pointer-events: auto;
  animation: toastIn 0.2s ease;
}

.toast.toast-out { animation: toastOut 0.2s ease forwards; }

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

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

/* Screen Flash */
.screen-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-modal);
  animation: flash 0.4s ease;
}

.screen-flash.work { background: var(--text); }
.screen-flash.break { background: var(--success); }

@keyframes flash {
  0% { opacity: 0; }
  20% { opacity: 0.15; }
  100% { opacity: 0; }
}

/* Mobile Bottom Sheet */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.bottom-sheet-overlay.visible { opacity: 1; visibility: visible; }
.bottom-sheet-overlay[hidden] { display: none; }

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  z-index: var(--z-modal);
  max-height: 70vh;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.bottom-sheet.visible { transform: translateY(0); }
.bottom-sheet[hidden] { display: none; }

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: var(--space-2) auto;
}

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

.bottom-sheet-header h2 { font-size: var(--text-base); font-weight: 600; }

.bottom-sheet-content { flex: 1; overflow-y: auto; padding: var(--space-5); }

.mobile-task-btn {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  z-index: var(--z-dropdown);
  box-shadow: 0 4px 12px var(--shadow);
}

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

/* ==========================================================================
   Focus Mode - Works with both dark and light theme
   ========================================================================== */
.focus-mode .header { background: transparent; }
.focus-mode .side-section { display: none; }
.focus-mode .footer { display: none; }
.focus-mode .session-calendar { display: none; }
.focus-mode #reset-btn { display: none; }
.focus-mode #stop-btn { display: none; }
.focus-mode #customize-btn { display: none; }

.focus-mode .main { padding-top: 0; }

.focus-mode .main-grid {
  grid-template-columns: 1fr;
  max-width: 100%;
  height: 100vh;
  align-items: center;
  justify-items: center;
}

.focus-mode .timer-section {
  min-height: 100vh;
  justify-content: center;
  gap: var(--space-5);
}

.focus-mode .timer-container {
  width: 320px;
  height: 320px;
}

.focus-mode .timer-time {
  font-size: 5.5rem;
}

.focus-mode .timer-controls {
  gap: var(--space-5);
}

.focus-mode .control-btn {
  width: 48px;
  height: 48px;
}

.focus-mode .control-btn .icon {
  width: 24px;
  height: 24px;
}

.focus-mode .focus-tasks {
  display: block;
}

.focus-mode .mobile-task-btn {
  display: none !important;
}

.focus-mode #focus-toggle {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Responsive */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; max-width: 500px; }
  .timer-section { min-height: auto; padding: var(--space-6) 0; }
}

@media (max-width: 768px) {
  .main { padding-bottom: 100px; }
  .side-section { display: none; }
  .mobile-task-btn { display: flex; }
  .bottom-sheet[hidden] { display: flex; }
  .footer { display: none; }
  .gestures-info { display: block; }

  .focus-mode .timer-time { font-size: 4rem; }
  .focus-mode .timer-container { width: 260px; height: 260px; }
}

@media (max-width: 480px) {
  :root { --text-timer: 3.5rem; }
  .timer-container { width: 240px; height: 240px; }
  .control-btn { width: 44px; height: 44px; }
  .control-btn-primary { width: 56px; height: 56px; }

  .focus-mode .timer-time { font-size: 3.5rem; }
  .focus-mode .timer-container { width: 220px; height: 220px; }
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.timer-time.pulsing { animation: pulse 1s ease-in-out infinite; }

/* Print */
@media print {
  .header, .footer, .timer-controls, .modal-overlay, .toast-container, .bottom-sheet, .mobile-task-btn {
    display: none !important;
  }
}
