:root {
  /* Tüm değişkenler koyu tema için ayarlandı */
  --bg: #071025;
  --bg-soft: #071726;
  --card: #0b1220;
  --text: #e6eef6;
  --muted: #9aa6b2;
  --accent: #fb7185;
  --accent-2: #60a5fa;
  --glass: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.06);
  --success: #10b981;
  /* yeşil (başladı durumu için) */
  --danger: #ef4444;
  /* kırmızı (duraklatıldı durumu için) */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Arial;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  transition: background .28s ease, color .18s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.3px;
}

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

.container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px;
}

.panel {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
  border: 1px solid var(--border);
  transition: background .18s ease, color .18s ease;
}

.timer-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.big-time {
  font-weight: 700;
  font-size: 66px;
  letter-spacing: 1px;
}

.timer-label {
  color: var(--muted);
  margin-top: 6px;
}

.timer-controls .durations {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.timer-controls label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-controls input[type=number] {
  width: 80px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #e6e9f1;
}

.controls-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.controls-row .btn {
  flex: 1;
  min-width: 104px;
}

.btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background .12s ease, color .12s ease, transform .06s ease;
}

.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.btn.started {
  background: var(--success);
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18);
  transition: transform .12s ease;
}

.btn.started:active {
  transform: translateY(1px);
}

.btn.paused {
  background: var(--danger);
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.btn.paused:active {
  transform: translateY(1px);
}

.btn.resume {
  background: var(--accent-2);
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 18px rgba(96, 165, 250, 0.25);
}

/* Reset butonuna gelince uyarı rengi */
#resetBtn:hover,
#resetBtn:focus,
#resetBtn:focus-visible {
  background: var(--danger);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

.task-form button[type=submit]:hover,
.task-form button[type=submit]:focus,
.task-form button[type=submit]:focus-visible {
  background: var(--success);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

.task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.task-form input {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.task-form button[type=submit] {
  background: var(--success);
  color: white;
  border-color: transparent;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.task-item.completed {
  opacity: 0.6;
  text-decoration: line-through;
}

.task-text {
  word-break: break-word;
}

.task-list button[data-del] {
  background: transparent;
}

.task-list button[data-del]:hover,
.task-list button[data-del]:focus,
.task-list button[data-del]:focus-visible,
#clearCompleted:hover,
#clearCompleted:focus,
#clearCompleted:focus-visible,
#clearAll:hover,
#clearAll:focus,
#clearAll:focus-visible {
  background: var(--danger);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

#clearCompleted,
#clearAll {
  background: var(--danger);
  color: white;
  border-color: transparent;
}

.helper-panel {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--glass);
}

.helper-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.helper-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}

.helper-list .key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 2px 6px;
  margin-right: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--text);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auto-start-toggle {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-footer {
  max-width: 1100px;
  margin: 20px auto;
  padding: 12px 20px;
  color: var(--muted);
  font-size: 13px;
}

.small {
  font-size: 12px;
}

/* Responsive */
@media (max-width:980px) {
  .container {
    grid-template-columns: 1fr;
    padding: 0 14px;
  }

  .big-time {
    font-size: 46px;
  }
}

@media (max-width:640px) {
  .panel {
    padding: 14px;
  }

  .site-header {
    padding: 14px 16px;
  }

  .container {
    gap: 14px;
  }

  .timer-controls .durations {
    gap: 10px;
  }

  .controls-row {
    flex-direction: column;
  }

  .controls-row .btn {
    width: 100%;
  }

  .big-time {
    font-size: 40px;
  }

  .timer-label {
    font-size: 14px;
  }

  .task-form input {
    width: 100%;
  }

  .task-form button[type=submit] {
    width: 100%;
  }

  .task-item {
    align-items: flex-start;
  }

  .task-item .btn {
    white-space: nowrap;
  }
}