:root {
  --bg: #0a0a0f;
  --bg-deep: #050508;
  --surface: #12121a;
  --surface-soft: #0f0f14;
  --border: #1e1e28;
  --border-soft: #18181f;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --success: #22c55e;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  flex: 1;
  text-align: center;
}

.header-home {
  color: var(--text);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 600;
}

.header-home:hover {
  color: var(--accent);
}

.header-spacer {
  min-width: 6rem;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.timer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.timer-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.timer-display span {
  font-variant-numeric: tabular-nums;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.timer-display.running span {
  color: var(--accent);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.entries-section {
  margin-top: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.total {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  gap: 1rem;
  transition: border-color 0.2s;
}

.entry-info {
  flex: 1;
  min-width: 0;
}

.entry-desc {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.entry-duration {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex-shrink: 0;
}

.entry.running .entry-duration {
  color: var(--accent);
}

.entry-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
}

.entry-delete:hover {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
