@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background: #1a1a1a;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 650px;
  margin: 60px auto;
  background: #2a2a2a;
  padding: 2em;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid #404040;
}

h1, h2 {
  margin-bottom: 0.5em;
  font-weight: 600;
}

/* Buttons */
button {
  padding: 8px 14px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

button[type="submit"] {
  background: #ff8c42;
  color: white;
}

button[type="submit"]:hover {
  background: #e6793a;
}

.logout-button {
  background: #dc3545;
  color: white;
  margin-top: 20px;
}

.logout-button:hover {
  background: #b02a37;
}

/* Todo list */
.todo-list,
.todo-list li,
.subtask-list {
  padding-left: 0em; /* Indent subtasks */
  margin-top: 0.5em;
  list-style: none;
}

.subtask-list {
  padding-left: 1.5em;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid #555;
  border-radius: 10px;
  background: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  gap: 0.5em;
  flex-wrap: wrap;
}

.todo-left {
  display: flex;
  align-items: center; /* was flex-start */
  gap: 0.5em;
  flex: 1;
}

.todo-title {
  flex: 1;
  word-break: break-word;
}

.notes-icon {
  align-self: center;
  font-size: 1.1em;
  color: #bbb;
  cursor: help;
  padding: 2px 10px 2px 0;
  display: inline-flex;
}

.tag-container {
  gap: 0.3em;
  flex-wrap: wrap;
}

.tag-pill {
  color: #e0e0e0;
  background: #555;
  font-size: 0.75em;
  padding: 0.2em 0.6em;
  border-radius: 9999px;
  white-space: nowrap;
  font-weight: 500;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.delete-button,
.split-button {
  background: none;
  font-size: 1.3rem;
  color: #aaa;
}

.delete-button:hover,
.split-button:hover {
  color: #fff;
}

/* Subtasks */
.subtask {
  margin: 4px 0;
  background: #404040;
  border-left: 4px solid #ff8c42;
  padding: 6px 10px;
  border-radius: 6px;
}

.subtask-box {
  width: 100%;
  padding-top: 0.5em;
}

/* Modals */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #2a2a2a;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 1px solid #555;
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

/* Inputs */
input[type="text"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #404040;
  color: #e0e0e0;
}

textarea {
  resize: vertical;
}

/* Date Picker & Tag Filter */
.date-picker-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1em;
}

.date-picker-row {
  margin-bottom: 1em;
}

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

.date-controls input[type="date"] {
  padding: 6px;
  font-size: 1rem;
}

.date-picker-controls input[type="date"],
.date-picker-controls button,
#tag-filter,
.complete-day-button {
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1.2;
  vertical-align: middle;
  margin: 0; /* reset any browser defaults */
}

.complete-day-button {
  margin-top: 6px;
}

.tag-filter-container {
  align-items: center;
  gap: 8px;
  margin-bottom: 1em;
}

#tag-filter {
  background: #404040;
  border: 1px solid #555;
  padding: 6px 10px;
  color: #e0e0e0;
}

/* Misc */
.dragging {
  opacity: 0.6;
}

.keyword {
  background-color: #4a5568;
  color: #ffd700;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.custom-tooltip {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.keyword-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.keyword-modal {
  background: #2a2a2a;
  padding: 1.5em;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border: 1px solid #555;
}

.notes-log {
  margin-top: 1em;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: #e0e0e0;
}

.note-entry {
  padding: 0.5em 0;
  border-bottom: 1px solid #555;
}

.keyword-modal button {
  margin-top: 1.5em;
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 6px;
  cursor: pointer;
}

.keyword-modal button:hover {
  background-color: #1d4ed8;
}

/* Login Form Styles */
.form {
  max-width: 400px;
  margin: 0 auto;
  padding: 0 20px;
}

.form label {
  display: block;
  margin-bottom: 20px;
  color: #e0e0e0;
  font-weight: 500;
  font-size: 1rem;
}

.form input[type="text"],
.form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  margin-top: 8px;
  border: 2px solid #404040;
  border-radius: 10px;
  background: #333;
  color: #e0e0e0;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input[type="text"]:focus,
.form input[type="password"]:focus {
  outline: none;
  border-color: #ff8c42;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
  background: #3a3a3a;
}

.form input[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #ff8c42;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.form input[type="submit"]:hover {
  background: #e6793a;
  transform: translateY(-1px);
}

.form input[type="submit"]:active {
  transform: translateY(0);
}

/* Links and Navigation */
a {
  color: #b794f6;
  text-decoration: none;
}

a:hover {
  color: #d6bcfa;
  text-decoration: underline;
}

a:visited {
  color: #9f7aea;
}

/* Header and Title Styling */
h1, h2, h3 {
  color: #e0e0e0;
}

h2 {
  color: #ff8c42;
  text-align: center;
  margin-bottom: 30px;
}