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

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.app {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 28px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.6rem;
}

.subtitle {
  text-align: center;
  color: #888;
  margin-top: -10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* Giriş / Kayıt ekranı */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form input {
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  border-color: #764ba2;
}

.auth-buttons {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.auth-buttons button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  background: #764ba2;
  color: #fff;
  transition: background 0.2s;
}

.auth-buttons button:hover {
  background: #5e3a85;
}

.auth-buttons button.secondary {
  background: #f3f3f3;
  color: #764ba2;
}

.auth-buttons button.secondary:hover {
  background: #e7e7e7;
}

.text-link {
  text-align: center;
  font-size: 0.85rem;
  color: #764ba2;
  text-decoration: none;
  margin-top: 2px;
}

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

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #bbb;
  font-size: 0.85rem;
  margin: 18px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.divider span {
  padding: 0 12px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #444;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.google-btn:hover {
  background: #f7f7f7;
  border-color: #d0d0d0;
}

.auth-message {
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 4px;
}

.auth-message.error {
  color: #e74c3c;
}

.auth-message.success {
  color: #27ae60;
}

/* Üst bar */
.topbar {
  margin-bottom: 16px;
}

.topbar h1 {
  margin-bottom: 8px;
}

.user-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
}

.user-box button {
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  color: #764ba2;
  font-size: 0.85rem;
}

.user-box button:hover {
  background: #f3f3f3;
}

.todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.todo-form input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.todo-form input:focus {
  border-color: #764ba2;
}

.todo-form button {
  padding: 12px 20px;
  background: #764ba2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.todo-form button:hover {
  background: #5e3a85;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  flex: 1;
  padding: 8px;
  background: #f3f3f3;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #555;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #764ba2;
  color: #fff;
}

.todo-list {
  list-style: none;
  margin-bottom: 16px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fafafa;
  transition: background 0.2s;
}

.todo-item:hover {
  background: #f0f0f0;
}

.todo-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-item span {
  flex: 1;
  word-break: break-word;
  color: #333;
}

.todo-item.completed span {
  text-decoration: line-through;
  color: #aaa;
}

.todo-item .delete {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.todo-item .delete:hover {
  background: #fdecea;
}

.empty {
  text-align: center;
  color: #aaa;
  padding: 24px 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.footer button {
  background: none;
  border: none;
  color: #764ba2;
  cursor: pointer;
  font-size: 0.85rem;
}

.footer button:hover {
  text-decoration: underline;
}
