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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Menu */
.menu {
  position: relative;
  background: #1a1a1a;
  padding: 1rem;
  z-index: 1000;
}

.menu-toggle {
  display: none;
  width: 100%;
  background: #222;
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.menu-arrow {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.menu.open .menu-arrow {
  transform: rotate(180deg);
}

.menu-items {
  display: flex;
  gap: 1px;
  justify-content: center;
}

.menu-item {
  background: #222;
  border: none;
  color: #666;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-item:hover {
  color: #999;
  background: #2a2a2a;
}

.menu-item.active {
  color: #fff;
  background: #333;
}

/* Menu Dropdown */
.menu-item-dropdown {
  position: relative;
}

.menu-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  min-width: 120px;
  z-index: 200;
  flex-direction: column;
  padding: 0.25rem;
  gap: 0.25rem;
}

.menu-item-dropdown:hover .menu-dropdown-content {
  display: flex;
}

.menu-dropdown-content .menu-item {
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
}

.menu-item-dropdown > .menu-item .menu-arrow {
  font-size: 0.6rem;
  margin-left: 0.25rem;
}

.browse-timers-link {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ef4444;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ef4444;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.browse-timers-link:hover {
  background: #ef4444;
  color: #fff;
}

@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }

  .menu-items {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    z-index: 100;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .menu.open .menu-items {
    display: flex;
  }

  .menu-item {
    width: 100%;
    text-align: center;
  }

  .browse-timers-link {
    position: static;
    transform: none;
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    width: 100%;
  }

  .menu-item-dropdown {
    width: 100%;
  }

  .menu-dropdown-content {
    display: flex;
    position: static;
    border: none;
    background: #151515;
    padding: 0.25rem 0 0.25rem 1rem;
  }

  .menu-dropdown-content .menu-item {
    text-align: center;
  }

  .menu-item-dropdown > .menu-item {
    display: none;
  }
}

/* Stopwatch Container */
.stopwatch-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Mode Switching */
.mode {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mode.active {
  display: flex;
}

/* Large Stopwatch */
.large-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 50vh;
}

.large-display .time {
  font-size: clamp(4rem, 20vw, 16rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

/* Lap Timer */
.lap-display {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.lap-display .time {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 120px;
}

.btn:hover:not(:disabled) {
  background: #333;
  border-color: #444;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-start {
  background: #1a3d1a;
  border-color: #2d5a2d;
}

.btn-start:hover:not(:disabled) {
  background: #245024;
}

.btn-start.running {
  background: #3d1a1a;
  border-color: #5a2d2d;
}

.btn-start.running:hover:not(:disabled) {
  background: #502424;
}

.btn-stop {
  background: #3d1a1a;
  border-color: #5a2d2d;
}

.btn-stop:hover:not(:disabled) {
  background: #502424;
}

.btn-lap {
  background: #1a2d3d;
  border-color: #2d4a5a;
}

.btn-lap:hover:not(:disabled) {
  background: #243d50;
}

.btn-export {
  background: #2d2d1a;
  border-color: #4a4a2d;
}

.btn-export:hover:not(:disabled) {
  background: #3d3d24;
}

/* Lap List */
.lap-list {
  margin-top: 3rem;
  width: 100%;
  max-width: 400px;
  max-height: 300px;
  overflow-y: auto;
}

.lap-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #222;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

.lap-item:last-child {
  background: #1a1a1a;
}

.lap-number {
  color: #666;
}

.lap-time {
  color: #fff;
}

/* Scrollbar */
.lap-list::-webkit-scrollbar {
  width: 6px;
}

.lap-list::-webkit-scrollbar-track {
  background: #111;
}

.lap-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.lap-list::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Multi Stopwatch */
.multi-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-add {
  background: #1a2d3d;
  border-color: #2d4a5a;
}

.btn-add:hover:not(:disabled) {
  background: #243d50;
}

/* Toggle Label */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #666;
  transition: color 0.15s;
}

.toggle-label:hover {
  color: #999;
}

.toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4ade80;
  cursor: pointer;
}

.toggle-label input[type="checkbox"]:checked + span {
  color: #fff;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 1400px;
  padding: 0.5rem;
}

.timer-card {
  background: #151515;
  border: 1px solid #252525;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-name {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  color: #fff;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  outline: none;
}

.timer-name:focus {
  border-color: #555;
}

.timer-name::placeholder {
  color: #555;
}

.timer-remove {
  background: transparent;
  border: none;
  color: #444;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

.timer-remove:hover {
  color: #888;
}

.timer-time {
  font-size: 2rem;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  text-align: center;
  padding: 0.5rem 0;
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
}

.timer-controls .btn {
  flex: 1;
  padding: 0.625rem 0.5rem;
  font-size: 0.75rem;
  min-width: auto;
}

.timer-laps {
  max-height: 120px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.timer-lap-item {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  border-bottom: 1px solid #1a1a1a;
}

.timer-lap-item:first-child {
  background: #1a1a1a;
}

.timer-lap-number {
  color: #555;
}

.timer-lap-time {
  color: #aaa;
}

.timer-grid::-webkit-scrollbar,
.timer-laps::-webkit-scrollbar {
  width: 4px;
}

.timer-grid::-webkit-scrollbar-track,
.timer-laps::-webkit-scrollbar-track {
  background: #111;
}

.timer-grid::-webkit-scrollbar-thumb,
.timer-laps::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.timer-grid::-webkit-scrollbar-thumb:hover,
.timer-laps::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Pomodoro */
.pomodoro-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.preset-btn {
  background: #222;
  border: 1px solid #333;
  color: #666;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  color: #999;
  background: #2a2a2a;
}

.preset-btn.active {
  color: #fff;
  background: #333;
  border-color: #444;
}

.preset-custom {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  width: 80px;
  text-align: center;
  outline: none;
}

.preset-custom:focus {
  border-color: #555;
}

.preset-custom::placeholder {
  color: #555;
}

.preset-custom::-webkit-outer-spin-button,
.preset-custom::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pomodoro-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 30vh;
}

.pomodoro-display .time {
  font-size: clamp(4rem, 18vw, 14rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

.pomodoro-display .time.finished {
  color: #e74c3c;
  animation: pulse 1s ease-in-out infinite;
}

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

.pomodoro-status {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #666;
  min-height: 1.5rem;
}

/* Task List */
.task-list-container {
  margin-top: 2rem;
  width: 100%;
  max-width: 400px;
}

.task-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.task-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
}

.task-input:focus {
  border-color: #555;
}

.task-input::placeholder {
  color: #555;
}

.btn-add-task {
  padding: 0.75rem 1.25rem;
  min-width: auto;
}

.task-list {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid #222;
  cursor: pointer;
  transition: background 0.15s;
}

.task-item:hover {
  background: #1a1a1a;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #444;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.task-item.completed .task-checkbox {
  background: #4ade80;
  border-color: #4ade80;
}

.task-checkbox::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  margin-bottom: 2px;
}

.task-item.completed .task-checkbox::after {
  opacity: 1;
}

.task-text {
  flex: 1;
  font-size: 0.875rem;
  transition: all 0.15s;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: #555;
}

.task-remove {
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
  opacity: 0;
}

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

.task-remove:hover {
  color: #888;
}

.task-list::-webkit-scrollbar {
  width: 4px;
}

.task-list::-webkit-scrollbar-track {
  background: #111;
}

.task-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

/* Visual Timer */
.visual-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.color-picker {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: none;
  padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker::-webkit-color-swatch {
  border: 2px solid #333;
  border-radius: 4px;
}

.color-picker::-moz-color-swatch {
  border: 2px solid #333;
  border-radius: 4px;
}

.image-upload-btn {
  padding: 0.5rem 1rem;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.image-upload-btn:hover {
  background: #2a2a2a;
  color: #fff;
  border-color: #444;
}

.image-upload-btn.has-image {
  background: #1a3a1a;
  border-color: #2a5a2a;
  color: #4ade80;
}

.visual-time-display {
  margin-bottom: 1rem;
}

.visual-time-display .time {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

.visual-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(80vw, 400px);
  height: min(80vw, 400px);
}

.visual-ring {
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

.visual-ring-bg {
  fill: #222;
  stroke: none;
}

.visual-ring-progress {
  fill: #ef4444;
  stroke: none;
  transform-origin: center;
  transition: none;
}

.visual-ring-tick {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 2;
}

.visual-ring-tick.major {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 3;
}

.visual-time-display .time.finished {
  color: #ef4444;
  animation: pulse 1s ease-in-out infinite;
}

/* Salary Calculator */
.salary-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.salary-currency {
  font-size: 1.5rem;
  color: #666;
}

.salary-amount {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
  width: 160px;
  text-align: right;
  outline: none;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

.salary-amount:focus {
  border-color: #555;
}

.salary-amount::placeholder {
  color: #444;
}

.salary-amount::-webkit-outer-spin-button,
.salary-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.salary-period {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  outline: none;
}

.salary-period:focus {
  border-color: #555;
}

.salary-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 30vh;
}

.salary-earned {
  font-size: clamp(3rem, 14vw, 10rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  color: #4ade80;
}

.salary-rate {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
  min-height: 1.5rem;
}

/* Mobile compact list view */
@media (max-width: 600px) {
  .timer-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .timer-card {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #222;
  }

  .timer-header {
    flex: 0 0 auto;
    width: 80px;
  }

  .timer-name {
    font-size: 0.75rem;
    border-bottom: none;
  }

  .timer-name::placeholder {
    color: #666;
  }

  .timer-remove {
    display: none;
  }

  .timer-time {
    flex: 1;
    font-size: 1.5rem;
    padding: 0;
    text-align: left;
  }

  .timer-controls {
    flex: 0 0 auto;
    gap: 0.375rem;
  }

  .timer-controls .btn {
    padding: 0.5rem 0.625rem;
    font-size: 0.625rem;
  }

  .timer-laps {
    display: none;
  }

  .multi-controls {
    flex-wrap: wrap;
    padding: 0 0.5rem;
  }

  .multi-controls .btn {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
  }
}

/* Mode Title */
.mode-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

/* SEO Footer */
.seo-footer {
  margin-top: 3rem;
  padding: 2rem;
  max-width: 600px;
  text-align: center;
  border-top: 1px solid #222;
}

.seo-footer p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #444;
}

.seo-footer kbd {
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 0.125rem 0.375rem;
  font-family: inherit;
  font-size: 0.75rem;
}

.seo-footer a {
  color: #666;
  text-decoration: none;
}

.seo-footer a:hover {
  color: #999;
}

/* SEO Header for landing pages */
.seo-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.seo-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  color: #fff;
  margin-bottom: 0.5rem;
}

.seo-subtitle {
  font-size: 1rem;
  color: #666;
}

/* SEO Content Section */
.seo-content {
  margin-top: 3rem;
  padding: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-top: 1px solid #222;
  text-align: left;
}

.seo-content h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #ccc;
  margin: 2rem 0 1rem 0;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #888;
  margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #888;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.seo-content li {
  margin-bottom: 0.5rem;
}

.seo-content strong {
  color: #aaa;
}

.seo-content kbd {
  background: #222;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 0.125rem 0.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  color: #ccc;
}

/* Liquid Timer */
.liquid-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.liquid-time-display {
  margin-bottom: 1rem;
  z-index: 10;
  position: relative;
}

.liquid-time-display .time {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.liquid-time-display .time.finished {
  color: #ef4444;
  animation: pulse 1s ease-in-out infinite;
}

.liquid-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 50vh;
  min-height: 300px;
  max-height: 500px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #0c1929 0%, #1a365d 100%);
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.3),
    0 4px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#liquid-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.liquid-bubbles {
  display: none;
}

/* Sand Timer */
.sand-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sand-time-display {
  margin-bottom: 1rem;
  z-index: 10;
  position: relative;
}

.sand-time-display .time {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

.sand-time-display .time.finished {
  color: #ef4444;
  animation: pulse 1s ease-in-out infinite;
}

.sand-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 55vh;
  min-height: 350px;
  max-height: 500px;
}

#sand-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#sand-mode .controls {
  z-index: 10;
  position: relative;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .sand-container {
    max-width: 100%;
    height: 45vh;
    min-height: 280px;
  }

  .sand-time-display .time {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
}

/* Rainbow Timer */
.rainbow-time-display {
  margin-bottom: 1rem;
}

.rainbow-time-display .time {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  color: #333;
}

.rainbow-time-display .time.finished {
  color: #e74c3c;
  animation: pulse 1s ease-in-out infinite;
}

.rainbow-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(85vw, 420px);
  height: min(85vw, 420px);
  padding: 20px;
}

#rainbow-canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

#rainbow-mode .controls {
  margin-top: 1.5rem;
}

#rainbow-mode .controls .btn {
  background: #3498db;
  border-color: #2980b9;
}

#rainbow-mode .controls .btn:hover {
  background: #2980b9;
}

#rainbow-mode .controls .btn-start.running {
  background: #e74c3c;
  border-color: #c0392b;
}

#rainbow-mode .controls .btn-start.running:hover {
  background: #c0392b;
}

#rainbow-mode .controls .btn-reset {
  background: #95a5a6;
  border-color: #7f8c8d;
}

#rainbow-mode .controls .btn-reset:hover {
  background: #7f8c8d;
}

@media (max-width: 600px) {
  .rainbow-display {
    width: min(90vw, 360px);
    height: min(90vw, 360px);
    padding: 15px;
  }

  .rainbow-time-display .time {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
}

#liquid-mode .controls {
  z-index: 10;
  position: relative;
}

/* Responsive adjustments for liquid timer */
@media (max-width: 600px) {
  .liquid-container {
    max-width: 100%;
    height: 40vh;
    min-height: 250px;
    border-radius: 12px;
  }

  .liquid-time-display .time {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
}

/* iOS App Section */
.ios-app-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.ios-app-section h2 {
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
}
.ios-app-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .ios-app-content {
    flex-direction: column;
    text-align: center;
  }
}
.ios-app-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.ios-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ios-app-details {
  flex: 1;
}
.ios-app-details h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}
.ios-app-details p {
  color: #888;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.ios-app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ios-app-feature {
  padding: 0.25rem 0.75rem;
  background: #333;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #aaa;
}
.app-store-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}
.app-store-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}
.app-screenshots {
  margin-top: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
}
.app-screenshots-inner {
  display: flex;
  gap: 1rem;
  padding-bottom: 0.5rem;
}
.app-screenshot {
  flex-shrink: 0;
  width: auto;
  height: 320px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: #222;
}
@media (max-width: 600px) {
  .app-screenshots {
    overflow-x: visible;
    padding: 0;
  }
  .app-screenshots-inner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .app-screenshot {
    width: 100%;
    max-width: 280px;
    height: auto;
  }
}

/* Site Footer with Timer Links */
.site-footer {
  background: #111;
  border-top: 1px solid #222;
  padding: 3rem 1.5rem 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: #888;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 1.5rem;
  text-align: center;
  color: #555;
  font-size: 0.75rem;
}

.browse-all-link {
  display: inline-block;
  color: #ef4444;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ef4444;
  border-radius: 4px;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.browse-all-link:hover {
  background: #ef4444;
  color: #fff;
}

@media (max-width: 600px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .site-footer {
    padding: 2rem 1rem 1.5rem;
  }
}
