:root {
  --primary: #4f8cff;
  --background: #f7f9fb;
  --section-bg: #fff;
  --border: #e0e4ea;
  --text: #222;
  --accent: #ffb347;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f5f5f5;
  color: #212121;
  margin: 0;
  padding: 0;
}

header {
  background: #1976d2;
  color: #fff;
  padding: 1.5rem 0 1.5rem 2rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.08);
  position: relative;
}

h1 {
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15), 0 1.5px 4px rgba(60, 64, 67, 0.08);
  padding: 2rem 1.5rem;
  min-width: 320px;
  flex: 1 1 340px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.2s;
}
section:hover {
  box-shadow: 0 6px 24px rgba(60, 64, 67, 0.18), 0 2px 8px rgba(60, 64, 67, 0.10);
}

h2 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.25rem;
  color: #1976d2;
  font-weight: 500;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#task-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
#task-form > * {
  flex: 1 1 120px;
  min-width: 0;
  box-sizing: border-box;
}
#task-form button {
  flex: 0 0 auto;
  align-self: stretch;
}
#task-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  transition: border 0.2s;
}
#task-input:focus {
  border-color: #1976d2;
  outline: none;
}
#task-form button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s;
}
#task-form button:hover {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.13);
}
#task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}
.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.05rem;
  transition: background 0.15s;
}
.task-item:last-child {
  border-bottom: none;
}
.task-label {
  flex: 1;
  cursor: pointer;
  padding-left: 0.2rem;
  transition: color 0.2s;
}
.task-completed .task-label {
  text-decoration: line-through;
  color: #bdbdbd;
}
.delete-task {
  background: none;
  border: none;
  color: #f44336;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 0.7rem;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.delete-task:hover {
  background: #fbe9e7;
}

#pomodoro {
  align-items: center;
}
#timer-display {
  font-size: 2.7rem;
  font-weight: 500;
  margin: 1.2rem 0 1.5rem 0;
  letter-spacing: 2px;
  color: #1976d2;
}
.timer-controls {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.timer-controls button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s;
}
.timer-controls button:hover {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.13);
}
.timer-modes {
  display: flex;
  gap: 0.7rem;
}
.mode-btn {
  background: #e3eafc;
  color: #1976d2;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 2px rgba(25, 118, 210, 0.04);
}
.mode-btn.active, .mode-btn:hover {
  background: #1976d2;
  color: #fff;
}

/* notes */
#notes-controls {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
#notes-controls button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s;
}
#notes-controls button:hover {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.13);
}
#notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem 0;
  max-height: 120px;
  overflow-y: auto;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}
.note-list-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
  border-radius: 8px 8px 0 0;
}
.note-list-item:last-child {
  border-bottom: none;
}
.note-list-item.selected {
  background: #1976d2;
  color: #fff;
}
#notes-area {
  min-height: 180px;
  resize: vertical;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fafafa;
  margin-top: 0;
  transition: border 0.2s;
}
#notes-area:focus {
  border-color: #1976d2;
  outline: none;
}

/* dark mode material */
body.dark-mode {
  --primary: #90caf9;
  --background: #121212;
  --section-bg: #23272f;
  --border: #2c3440;
  --text: #e6e6e6;
  --accent: #ffd580;
}
body.dark-mode {
  background: #121212;
  color: #e6e6e6;
}
body.dark-mode header {
  background: #23272f;
  color: #e6e6e6;
}
body.dark-mode section {
  background: #23272f;
  color: #e6e6e6;
  border-color: #2c3440;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.10), 0 1.5px 4px rgba(33, 150, 243, 0.05);
}
body.dark-mode #notes-list {
  background: #23272f;
  color: #e6e6e6;
  border-color: #2c3440;
}
body.dark-mode #notes-area {
  background: #23272f;
  color: #e6e6e6;
  border-color: #2c3440;
}
body.dark-mode .note-list-item.selected {
  background: #90caf9;
  color: #23272f;
}
body.dark-mode .mode-btn.active, body.dark-mode .mode-btn:hover {
  background: #90caf9;
  color: #23272f;
}
body.dark-mode #task-form button,
body.dark-mode .timer-controls button,
body.dark-mode #notes-controls button {
  background: #90caf9;
  color: #23272f;
}
body.dark-mode #task-form button:hover,
body.dark-mode .timer-controls button:hover,
body.dark-mode #notes-controls button:hover {
  background: #1976d2;
  color: #fff;
}
body.dark-mode #task-input,
body.dark-mode #notes-area {
  background: #181c22;
  color: #e6e6e6;
  border-color: #2c3440;
}
body.dark-mode .task-completed .task-label {
  color: #616161;
}
#dark-mode-toggle {
  position: absolute;
  top: 1.2rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s, background 0.2s;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#dark-mode-toggle:hover {
  background: rgba(25, 118, 210, 0.12);
}
#dark-mode-icon {
  font-size: 1.6rem;
  pointer-events: none;
}
body.dark-mode #dark-mode-toggle {
  color: #ffd580;
}
#break-feedback {
  display: block;
  min-height: 1.2em;
  text-align: center;
  color: #e53935;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
#break-feedback.show {
  opacity: 1;
  transform: translateY(-6px) scale(1.15);
}
@media (max-width: 900px) {
  main {
    flex-direction: column;
    align-items: center;
  }
  section {
    max-width: 100%;
    width: 100%;
  }
  #dark-mode-toggle {
    right: 1rem;
  }
}

#settings-toggle {
  position: absolute;
  top: 1.2rem;
  right: 4.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s, background 0.2s;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#settings-toggle:hover {
  background: rgba(25, 118, 210, 0.12);
}
#settings-icon {
  font-size: 1.4rem;
  pointer-events: none;
}

  /* modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(33, 33, 33, 0.32);
  align-items: center;
  justify-content: center;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: #fff;
  margin: auto;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 32px rgba(60, 64, 67, 0.18);
  min-width: 320px;
  max-width: 95vw;
  position: relative;
  animation: modalIn 0.2s;
}
@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.close:hover {
  color: #f44336;
}
#settings-sections section {
  margin-bottom: 1.5rem;
}
#settings-sections label {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 1rem;
  color: #333;
}
#settings-sections input[type="color"] {
  margin-left: 0.5rem;
  border: none;
  width: 2rem;
  height: 2rem;
  background: none;
}
#settings-sections input[type="file"] {
  margin-left: 0.5rem;
}
#settings-sections input[type="number"] {
  width: 3.5rem;
  margin-left: 0.5rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
}
#settings-sections input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* task form enhancements */
#task-form select, #task-form input[type="date"], #task-form input[list] {
  padding: 0.7rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  margin-right: 0.5rem;
  transition: border 0.2s;
}
#task-form select:focus, #task-form input[type="date"]:focus, #task-form input[list]:focus {
  border-color: #1976d2;
  outline: none;
}
#task-form select {
  min-width: 6.5rem;
}
#task-form input[type="date"] {
  min-width: 8.5rem;
}
#task-form input[list] {
  min-width: 7rem;
}

/* task priority colors */
.task-priority-high {
  border-left: 4px solid #e53935;
  background: #ffebee;
}
.task-priority-medium {
  border-left: 4px solid #fbc02d;
  background: #fffde7;
}
.task-priority-low {
  border-left: 4px solid #43a047;
  background: #e8f5e9;
}

/* overlap fix for toggles */
@media (max-width: 900px) {
  #settings-toggle {
    right: 4.5rem;
  }
  #dark-mode-toggle {
    right: 1rem;
  }
}

body.dark-mode .modal-content {
  background: #23272f;
  color: #e6e6e6;
}
body.dark-mode .close {
  color: #bbb;
}
body.dark-mode .close:hover {
  color: #f44336;
}
body.dark-mode #settings-sections label {
  color: #e6e6e6;
}
body.dark-mode #settings-sections input[type="number"] {
  background: #181c22;
  color: #e6e6e6;
  border-color: #2c3440;
}
body.dark-mode #settings-sections input[type="number"]:focus {
  border-color: #90caf9;
}
#pomodoro .timer-controls {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
}
#pomodoro .timer-controls button {
  min-width: 90px;
  margin-bottom: 0.5rem;
}
@media (max-width: 500px) {
  #pomodoro .timer-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  #pomodoro .timer-controls button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  #task-form {
    flex-direction: column;
    gap: 0.7rem;
  }
  #task-form > * {
    width: 100%;
    min-width: 0;
  }
  #task-form button {
    width: 100%;
  }
}

#notes-search-btn {
  background: none;
  border: none;
  color: #1976d2;
  font-size: 1.2rem;
  margin-left: 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
  top: 0.2rem;
}
#notes-search-btn:hover {
  background: rgba(25, 118, 210, 0.10);
}
#notes-search-icon {
  font-size: 1.3rem;
  pointer-events: none;
}
.spotlight-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(33, 33, 33, 0.32);
  z-index: 2000;
  justify-content: center;
  animation: fadeIn 0.18s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#notes-search-bar > input {
  width: 350px;
  max-width: 90vw;
  padding: 1rem 1.2rem;
  font-size: 1.2rem;
  border-radius: 12px;
  border: 1.5px solid #1976d2;
  box-shadow: 0 4px 24px rgba(60,64,67,0.18);
  margin-bottom: 1rem;
  background: #fff;
  color: #222;
  outline: none;
  transition: border 0.2s;
}
#notes-search-bar > input:focus {
  border-color: #1565c0;
}
#notes-search-close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}
#notes-search-close:hover {
  color: #f44336;
}
#notes-search-results {
  width: 350px;
  max-width: 90vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(60,64,67,0.18);
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}
#notes-search-results li {
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-size: 1.05rem;
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}
#notes-search-results li:last-child {
  border-bottom: none;
}
#notes-search-results li:hover, #notes-search-results li.selected {
  background: #e3eafc;
  color: #1976d2;
}
body.dark-mode #notes-search-bar > input,
body.dark-mode #notes-search-results {
  background: #23272f;
  color: #e6e6e6;
  border-color: #2c3440;
}
body.dark-mode #notes-search-results li:hover, body.dark-mode #notes-search-results li.selected {
  background: #23272f;
  color: #90caf9;
}

/* Motivational Quote */
.quote-section {
  background: #f8f9fa;
  color: #333;
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}
#quote-text {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
  font-style: italic;
}
#quote-author {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.7;
  display: block;
}
body.dark-mode .quote-section {
  background: #181c22;
  color: #e6e6e6;
  border-color: #2c3440;
}

/* task priority colors - dark mode */
body.dark-mode .task-priority-high {
  border-left: 4px solid #e53935;
  background: #2d1b1b;
}
body.dark-mode .task-priority-medium {
  border-left: 4px solid #fbc02d;
  background: #2d2a1b;
}
body.dark-mode .task-priority-low {
  border-left: 4px solid #43a047;
  background: #1b2d1b;
}
body.dark-mode #task-list {
  background: #181c22;
  border-color: #2c3440;
}

    /* footer */
#footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}
#footer a {
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
#footer a:hover {
  color: #1976d2;
}
body.dark-mode #footer {
  background: #121212;
  border-top-color: #2c3440;
}
body.dark-mode #footer a {
  color: #888;
}
body.dark-mode #footer a:hover {
  color: #90caf9;
} 