* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* App bar */
.appbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: #0a0a0a;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

/* Day progress bar — sits between brand and function */
.progressbar {
  flex: 0 0 auto;
  height: 1px;
  width: 100%;
  background: #161616;
  overflow: hidden;
}
.progressbar-fill {
  height: 100%;
  width: 0%;
  background: rgba(74, 222, 128, 0.55);
  transition: width 0.3s ease;
}
.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0;
}
.logo-no {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.45);
}
.logo-bro { color: #d4d4d8; }
.logo-app {
  color: #a1a1aa;
  font-weight: 700;
  font-size: 0.85em;
  margin-left: 1px;
}
.tagline {
  font-size: 11px;
  color: #a1a1aa;
  letter-spacing: 0.3px;
  font-weight: 500;
}
.appbar-actions {
  display: flex;
  gap: 4px;
}
.iconbtn {
  background: none;
  border: none;
  color: #d4d4d8;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.iconbtn:active { background: #1a1a1a; color: #f0f0f0; }
.iconbtn svg { width: 22px; height: 22px; }

/* Content wrapper */
.content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.top {
  font-size: 13px;
  color: #b8b8c0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.bolge {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hareket {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
}
.hareket-link, .hareket-link:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed #333;
}
.hareket-link::after {
  content: " ↗";
  font-size: 0.4em;
  color: #666;
  vertical-align: super;
  border-bottom: none;
}
.summary-row .name a, .summary-row .name a:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed #333;
}
.hedef {
  font-size: 20px;
  color: #aaa;
}
.aciklama {
  font-size: 15px;
  color: #777;
  max-width: 320px;
  line-height: 1.4;
  margin-top: 4px;
}
.timer {
  font-size: 96px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  color: #4ade80;
}
.timer-label {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
}
#bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.btn {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  border: none;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-start { background: #4ade80; color: #0a0a0a; }
.btn-done { background: #f59e0b; color: #0a0a0a; }
.btn-skip {
  background: transparent;
  color: #666;
  text-transform: none;
  font-weight: 400;
  font-size: 14px;
  padding: 12px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
}
.btn-skip:active { color: #999; }
.summary {
  width: 100%;
  max-width: 400px;
}
.summary h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #4ade80;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #222;
  font-size: 15px;
}
.summary-row .name { color: #ddd; }
.summary-row .val { color: #888; font-variant-numeric: tabular-nums; }
.summary-total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #333;
  font-weight: 600;
  color: #f0f0f0;
}
.empty {
  text-align: center;
  color: #888;
  font-size: 18px;
  line-height: 1.6;
}
.empty .big { font-size: 48px; margin-bottom: 16px; }
.footer {
  text-align: center;
  font-size: 11px;
  color: #444;
  margin-top: 16px;
}

/* Modal / bottom sheet */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease;
}
.modal-sheet {
  position: relative;
  background: #141414;
  border-radius: 20px 20px 0 0;
  padding: 8px 24px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
}
.modal-grabber {
  width: 36px;
  height: 4px;
  background: #333;
  border-radius: 2px;
  margin: 0 auto 12px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
}
.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.modal-close:active { background: #1f1f1f; color: #f0f0f0; }
.modal-body {
  color: #aaa;
  font-size: 15px;
  line-height: 1.5;
  min-height: 120px;
}
.manifesto {
  text-align: center;
  padding: 8px 0 16px;
}
.manifesto-pillars {
  font-size: 18px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}
.manifesto p {
  color: #bbb;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.manifesto .flow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #888;
  font-size: 13px;
  background: #1a1a1a;
  padding: 10px 14px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 4px;
}
.manifesto .quiet {
  color: #666;
  font-size: 12px;
  margin-top: 18px;
  letter-spacing: 0.2px;
}
.share-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.45);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.05s;
  font-family: inherit;
}
.share-btn svg { width: 14px; height: 14px; }
.share-btn:active { transform: scale(0.97); }
.share-btn:hover, .share-btn:active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border-color: #4ade80;
}
.share-btn.is-copied {
  color: #888;
  border-color: #2a2a2a;
  background: transparent;
}
.credits {
  margin-top: 22px;
  font-size: 11px;
  color: #555;
  letter-spacing: 0.2px;
  line-height: 1.6;
}
.credits a, .credits a:visited {
  color: #888;
  text-decoration: none;
  border-bottom: 1px dotted #333;
}
.credits a:hover { color: #d4d4d8; border-bottom-color: #555; }
.credits .sep { color: #333; margin: 0 4px; }

/* Program editor (Settings) */
.day-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.day-pills::-webkit-scrollbar { display: none; }
.day-pill {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #1a1a1a;
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.day-pill[aria-pressed="true"] {
  background: #4ade80;
  color: #0a0a0a;
  border-color: #4ade80;
}
.day-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ex-card {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #232323;
  border-radius: 12px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-card-actions {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  display: flex;
  gap: 2px;
}
.ex-card-actions button {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #777;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.ex-card-actions button:active { background: #2a2a2a; color: #f0f0f0; }
.ex-card-actions .remove { color: #f87171; }
.ex-row {
  display: flex;
  gap: 8px;
}
.ex-row > * { flex: 1; min-width: 0; }
.ex-input, .ex-textarea, .ex-num {
  width: 100%;
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px 10px;
  color: #f0f0f0;
  font-size: 14px;
  font-family: inherit;
}
.ex-input::placeholder, .ex-textarea::placeholder, .ex-num::placeholder { color: #555; }
.ex-input:focus, .ex-textarea:focus, .ex-num:focus {
  outline: none;
  border-color: #4ade80;
}
.ex-textarea {
  resize: vertical;
  min-height: 50px;
  line-height: 1.4;
}
.ex-num-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ex-num-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.add-ex-btn {
  margin-top: 12px;
  width: 100%;
  background: transparent;
  border: 1px dashed #333;
  border-radius: 10px;
  padding: 12px;
  color: #888;
  font-size: 14px;
  cursor: pointer;
}
.add-ex-btn:active { background: #161616; color: #ddd; }
.empty-day {
  text-align: center;
  color: #555;
  padding: 24px 0;
  font-size: 13px;
}
.program-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.program-actions button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: #4ade80; color: #0a0a0a; }
.btn-secondary {
  background: #1a1a1a;
  color: #d4d4d8;
  border: 1px solid #2a2a2a;
}
.program-sep {
  border: none;
  border-top: 1px solid #222;
  margin: 18px 0 14px;
}
.program-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.program-io button {
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  background: #1a1a1a;
  color: #d4d4d8;
  border: 1px solid #2a2a2a;
}
.program-danger {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #1f1f1f;
  display: flex;
  justify-content: center;
}
.program-danger .reset-btn {
  background: transparent;
  color: #6b6b6b;
  border: none;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.program-danger .reset-btn:hover,
.program-danger .reset-btn:active {
  color: #f87171;
  background: rgba(248, 113, 113, 0.06);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
