:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --primary: #2563eb;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 15px 20px;
  position: sticky;
  top: 0;
}

.app-header h1 {
  margin: 0 0 10px;
  font-size: 20px;
}

nav {
  display: flex;
  gap: 8px;
}

nav button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: #111827;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

nav button:hover {
  background: #e2e8f0;
}

nav button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

main {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 15px;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

section {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  border: navy;
  background: var(--primary);
  color: white;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.subject-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.subject-row input {
  flex: 1;
}

#timerDisplay {
  font-size: 48px;
  text-align: center;
  margin: 20px 0;
}
#timerMode {
  text-align: center;
  font-weight: bold;
  margin-top: 10px;
}

#breakHint {
  text-align: center;
  margin-top: 10px;
  color: var(--muted);
}

.focus-mode {
  border-left: 5px solid #2563eb;
}

.break-mode {
  border-left: 5px solid #22c55e;
}

.note {
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  background: #fafafa;
}

#summaryOutput {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  line-height: 1.6;
}

@media(max-width:600px){
  .subject-row {
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }
}