/* CSS Variables for theming */
:root {
  /* Light theme variables */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --border-color-hover: #ced4da;
  --accent-color: #007bff;
  --accent-hover: #0056b3;
  --danger-color: #dc3545;
  --danger-hover: #c82333;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --sidebar-bg: #f8f9fa;
  --sidebar-text: #495057;
  --sidebar-hover: #e9ecef;
  --modal-bg: #ffffff;
  --modal-border: #dee2e6;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Force-light theme wrapper (landing page) */
.force-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --border-color-hover: #ced4da;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --danger-color: #dc3545;
  --danger-hover: #c82333;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --sidebar-bg: #f8f9fa;
  --sidebar-text: #495057;
  --sidebar-hover: #e9ecef;
  --modal-bg: #ffffff;
  --modal-border: #dee2e6;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Dark theme variables */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #404040;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #404040;
  --border-color-hover: #505050;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --sidebar-bg: #262626;
  --sidebar-text: #d1d5db;
  --sidebar-hover: #374151;
  --modal-bg: #2d2d2d;
  --modal-border: #404040;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.App {
  width: 100%;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.todo-list h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.add-todo {
  display: flex;
  margin-bottom: 30px;
  gap: 10px;
}

.add-todo input {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.add-todo input:focus {
  outline: none;
  border-color: #007bff;
}

.add-todo button {
  padding: 12px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.add-todo button:hover {
  background-color: #0056b3;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
}

.todo-item input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.2);
}

.todo-item span {
  flex: 1;
  font-size: 16px;
}

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

.todo-item button {
  padding: 6px 12px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.todo-item button:hover {
  background-color: #c82333;
}

/* Authentication Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--bg-secondary);
}

.auth-card {
  background: var(--modal-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-color);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.auth-card button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
}

.auth-card button[type="submit"]:hover {
  background-color: var(--accent-hover);
}

.auth-card button[type="submit"]:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.message {
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0;
  text-align: center;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  text-decoration: underline;
}

.link-button:hover {
  color: var(--accent-hover);
}

/* Todo Header Styles */
.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.todo-header h1 {
  margin: 0;
  color: var(--text-primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

.logout-btn {
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.logout-btn:hover {
  background-color: #5a6268;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  margin: 40px 0;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-size: 18px;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
}
