/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #ffffff;
  --text:     #0d0d0d;
  --muted:    #888888;
  --border:   #d0d0d0;
  --ring-bg:  #ebebeb;
  --radius:   12px;
  --font:     'Schoolbell', cursive;
  --transition: .2s ease;
}

/* ── Base ── */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.app {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 0 28px;
}

.logo {
  font-family: var(--font);
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: .02em;
}

#themeToggle { display: none; }

/* ── Icon Buttons ── */
.icon-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition);
}
.icon-btn:hover { color: var(--text); border-color: var(--text); }
.icon-btn.secondary { width: 44px; height: 44px; }
.icon { width: 18px; height: 18px; }
.hidden { display: none !important; }

/* ── Timer Card ── */
.timer-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── Mode Tabs ── */
.mode-tabs {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  border-right: 1.5px solid var(--border);
  padding: 9px 12px;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.tab:last-child { border-right: none; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--text); color: var(--bg); }

/* ── Task Input ── */
.task-section { width: 100%; }

.task-input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--border);
  padding: 10px 4px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  border-radius: 0;
  transition: border-color var(--transition);
}
.task-input::placeholder { color: var(--muted); }
.task-input:focus { border-bottom-color: var(--text); }

/* ── Timer Display ── */
.timer-display {
  position: relative;
  width: 220px;
  height: 220px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--ring-bg);
  stroke-width: 3;
}

.ring-fill {
  fill: none;
  stroke: var(--text);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 678.6;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .5s linear, stroke .3s;
}

.mode-short .ring-fill  { stroke: var(--muted); }
.mode-long  .ring-fill  { stroke: #c0c0c0; }
.mode-short .tab.active { background: var(--muted); }
.mode-long  .tab.active { background: #c0c0c0; color: var(--text); }
.mode-short .start-btn  { background: var(--muted); }
.mode-long  .start-btn  { background: #c0c0c0; color: var(--text); }

.time-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 3.8rem;
  color: var(--text);
}

/* ── Controls ── */
.controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.start-btn {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 13px 52px;
  font-family: var(--font);
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity var(--transition), transform .1s;
  letter-spacing: .04em;
}
.start-btn:hover  { opacity: .8; }
.start-btn:active { transform: scale(.97); }

/* ── Session Dots ── */
.session-dots { display: flex; gap: 8px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.dot.filled { background: var(--text); border-color: var(--text); }

/* ── Log Section ── */
.log-section { margin-top: 32px; }

.log-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.log-title {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.log-total {
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
}

.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-empty {
  font-size: .9rem;
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 10px 4px;
}

.log-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.log-dot.focus { background: var(--text); }
.log-dot.short { background: var(--muted); }
.log-dot.long  { background: #c0c0c0; }

.log-task {
  flex: 1;
  font-size: .92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-meta {
  font-family: var(--font);
  font-size: .82rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Clear Button ── */
.clear-btn {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition);
}
.clear-btn:hover { color: var(--text); }

/* ── Notification Banner ── */
.notif {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: .95rem;
  white-space: nowrap;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  z-index: 100;
}
.notif.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── SEO Section ── */
.seo-section {
  margin-top: 48px;
  padding-bottom: 20px;
}

.seo-block {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.seo-block h2 {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.seo-block h3 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}

.seo-block p {
  font-size: .88rem;
  line-height: 1.85;
  color: var(--muted);
}

.seo-block strong { color: var(--text); font-weight: 400; }
.seo-block em { font-style: normal; color: var(--text); }

/* ── FAQ ── */
.faq { display: flex; flex-direction: column; margin-top: 8px; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-family: var(--font);
  font-size: .92rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item .faq-answer {
  font-family: var(--font);
  font-size: .87rem;
  line-height: 1.75;
  color: var(--muted);
  padding: 0 0 14px;
}
.faq-answer strong { color: var(--text); font-weight: 400; }

/* ── Responsive ── */
@media (max-width: 400px) {
  .time-text  { font-size: 3.2rem; }
  .timer-card { padding: 20px 16px 24px; }
}
