/* 全体のリセットとダークモード基本スタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 50% 0%, #1e1e24 0%, #0d0e12 100%);
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.container {
  background: #16181d;
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  border: 1px solid #272a34;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ヘッダー */
header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.9rem;
  color: #8b949e;
}

/* フォーム */
#todo-form {
  display: flex;
  gap: 8px;
}

#todo-input {
  flex: 1;
  padding: 12px 16px;
  background-color: #0d0e12;
  border: 1px solid #2d333b;
  border-radius: 8px;
  font-size: 1rem;
  color: #f0f6fc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#todo-input::placeholder {
  color: #57606a;
}

#todo-input:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

#add-btn {
  background-color: #238636;
  color: #ffffff;
  border: 1px solid rgba(240, 246, 252, 0.1);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

#add-btn:hover {
  background-color: #2ea043;
}

#add-btn:active {
  transform: scale(0.98);
}

/* ツールバー（フィルター & 一括削除） */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #21262d;
}

.filters {
  display: flex;
  gap: 4px;
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background-color: #21262d;
  color: #c9d1d9;
}

.filter-btn.active {
  background-color: #1f6feb;
  color: #ffffff;
  font-weight: 600;
}

.clear-btn {
  background: none;
  border: none;
  color: #6e7681;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: #f85149;
}

/* タスクリスト */
.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

/* カスタムスクロールバー */
.todo-list::-webkit-scrollbar {
  width: 6px;
}
.todo-list::-webkit-scrollbar-thumb {
  background-color: #30363d;
  border-radius: 3px;
}
.todo-list::-webkit-scrollbar-track {
  background-color: transparent;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0d0e12;
  border: 1px solid #252932;
  border-radius: 8px;
  padding: 12px 14px;
  transition: background-color 0.2s, border-color 0.2s;
}

.todo-item:hover {
  background-color: #1a1d24;
  border-color: #30363d;
}

.todo-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1f6feb;
}

.todo-text {
  font-size: 0.95rem;
  color: #e6edf3;
  word-break: break-all;
  user-select: none;
  cursor: pointer;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #484f58;
}

.delete-btn {
  background: none;
  border: none;
  color: #57606a;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.delete-btn:hover {
  color: #f85149;
  background-color: rgba(248, 81, 73, 0.15);
}

/* フッター */
.status-footer {
  font-size: 0.85rem;
  color: #6e7681;
  padding-top: 8px;
  border-top: 1px solid #21262d;
}
