/* karmaa.ai — light theme, one big purple button */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #a8a8a8;
  --line: #e6e6e6;
  --surface: #f7f7f5;
  --purple: #7c3aed;
  --purple-deep: #6d28d9;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 300;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}
#app { width: 100%; max-width: 720px; height: 100%; padding: 20px; display: flex; flex-direction: column; }
.screen { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hidden { display: none !important; }

.tagline { font-size: 22px; font-weight: 300; line-height: 1.4; text-align: center; letter-spacing: -0.3px; color: var(--ink); }
.sub { font-size: 14px; color: var(--muted); text-align: center; margin-top: 4px; }
#categories { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cat-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.cat-item:active { border-color: var(--ink); transform: scale(0.99); }
.cat-emoji { font-size: 24px; }
.cat-label { font-size: 16px; color: var(--ink); }

.screen.split { flex-direction: row; align-items: stretch; gap: 16px; height: 100%; min-height: 0; }
.col-feed { flex: 1.2 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.col-button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; overflow: hidden; }

.ticker { font-size: 14px; color: var(--muted); letter-spacing: 0.2px; }

.cap-row { display: flex; gap: 6px; width: 100%; justify-content: space-between; }
.cap-chip { flex: 1 1 0; padding: 8px 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 12px; font-family: inherit; cursor: pointer; opacity: 0.55; transition: opacity 0.15s, border-color 0.15s, background 0.15s; }
.cap-chip:active { background: var(--surface); }
.cap-chip.selected { opacity: 1; border-color: var(--ink); background: var(--bg); color: var(--ink); font-weight: 400; }
.cap-hint { font-size: 11px; color: var(--faint); text-align: center; font-style: italic; margin-top: -4px; }

#sin-text { width: 100%; min-height: 76px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 300; resize: none; outline: none; }
#sin-text::placeholder { color: var(--faint); }
#sin-text:focus { border-color: var(--ink); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; width: 100%; }
.check-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 3px; background: var(--bg); cursor: pointer; position: relative; flex-shrink: 0; }
.check-row input[type="checkbox"]:checked { background: var(--ink); }
.check-row input[type="checkbox"]:checked::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--bg); font-weight: bold; }

.karma-button { width: 160px; height: 160px; border-radius: 50%; border: none; background: var(--purple); color: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; box-shadow: 0 12px 40px rgba(124, 58, 237, 0.35); transition: transform 0.1s, box-shadow 0.2s, background 0.15s; margin-top: 4px; }
.karma-button:hover { background: var(--purple-deep); }
.karma-button:active { transform: scale(0.96); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4); }
.btn-amount { font-size: 26px; font-weight: 400; letter-spacing: -0.5px; color: #ffffff; }
.btn-label { font-size: 11px; font-weight: 400; letter-spacing: 0.6px; text-transform: uppercase; color: rgba(255,255,255,0.85); }

.sin-status { font-size: 12px; color: var(--muted); font-style: italic; min-height: 14px; text-align: center; }

.settings-link { font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.settings-link:active { color: var(--ink); }

.check { width: 72px; height: 72px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--ink); }
#confirm-headline { font-size: 22px; font-weight: 400; color: var(--ink); letter-spacing: -0.3px; text-align: center; }
.confirm-line { font-size: 16px; color: var(--muted); font-style: italic; text-align: center; }
.confirm-verdict { font-size: 14px; color: var(--faint); font-style: italic; letter-spacing: 0.2px; }
.back-btn { margin-top: 20px; padding: 12px 28px; background: var(--bg); color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; cursor: pointer; font-family: inherit; }
.back-btn:active { background: var(--surface); }

.feed-title { font-size: 20px; font-weight: 400; letter-spacing: -0.3px; color: var(--ink); }
#feed-list { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.screen.split #feed-list { flex: 1 1 0; min-height: 0; overflow-y: auto; }
#feed-list::-webkit-scrollbar { width: 4px; }
#feed-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.feed-item { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.feed-text { font-size: 14px; color: var(--ink); line-height: 1.4; margin-bottom: 6px; white-space: pre-wrap; word-wrap: break-word; }
.feed-meta { font-size: 11px; color: var(--faint); letter-spacing: 0.2px; }
.feed-empty, .feed-loading { color: var(--faint); text-align: center; font-style: italic; font-size: 13px; padding: 20px; }

.privacy-note { font-size: 11px; color: var(--faint); text-align: center; letter-spacing: 0.3px; margin-top: 10px; line-height: 1.4; }
.privacy-note.small { font-size: 10px; margin-top: 4px; }

.confess-generic { display: block; text-align: right; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 480px) {
  #app { padding: 12px; }
  .screen.split { gap: 10px; }
  .col-button { gap: 8px; }
  .ticker { font-size: 12px; }
  .cap-chip { padding: 6px 2px; font-size: 11px; }
  .cap-hint { font-size: 10px; }
  #sin-text { min-height: 52px; font-size: 13px; padding: 9px 11px; }
  .check-row { font-size: 11px; }
  .karma-button { width: 116px; height: 116px; }
  .btn-amount { font-size: 19px; }
  .btn-label { font-size: 9px; letter-spacing: 0.4px; }
  .settings-link { font-size: 11px; }
  .privacy-note.small { font-size: 9px; margin-top: 0; }
  .sin-status { font-size: 11px; min-height: 12px; }
  .feed-title { font-size: 17px; }
  .feed-text { font-size: 13px; }
  .feed-meta { font-size: 10px; }
  .feed-item { padding: 10px 12px; }
}

/* === ICON ROW === */
.icon-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}
.icon-btn {
  flex: 1 1 0;
  height: 52px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 22px;
  font-weight: 300;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.icon-btn:active { background: var(--surface); }
.icon-btn.active {
  border-color: var(--ink);
  background: var(--surface);
}

/* === PICKERS === */
.picker {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.picker-title {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.3px;
}
.picker-hint {
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  font-style: italic;
  margin-top: 2px;
}
.picker-body {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  text-align: center;
  padding: 0 6px;
}

#picker-cat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.picker-item:active { background: var(--surface); }
.picker-item.selected { border-color: var(--ink); }
.picker-emoji { font-size: 20px; }
.picker-label { font-size: 14px; color: var(--ink); }

.entry-default {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === MOBILE compact additions === */
@media (max-width: 480px) {
  .icon-btn { height: 44px; font-size: 18px; border-radius: 12px; }
  .icon-row { gap: 8px; }
  .picker-title { font-size: 12px; }
  .picker-item { padding: 8px 12px; gap: 10px; }
  .picker-emoji { font-size: 18px; }
  .picker-label { font-size: 13px; }
  .picker-body { font-size: 12px; line-height: 1.45; }
  .picker-hint { font-size: 10px; }
}

.picker-reset {
  margin-top: 4px;
  align-self: center;
  font-size: 12px;
  padding: 8px 18px;
  opacity: 0.6;
}
.picker-reset:active { opacity: 1; }




/* === VERTICAL CENTER BUTTON, top stuff up top === */
.col-button {
  justify-content: space-between !important;
  height: 100%;
  gap: 0 !important;
}
.top-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bottom-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* === RED 3D WEIGHTY BUTTON === */
.karma-button {
  width: 170px !important;
  height: 170px !important;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 32% 28%, #f87171 0%, #ef4444 30%, #dc2626 65%, #991b1b 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow:
    inset 0 6px 12px rgba(255, 255, 255, 0.25),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
  font-family: inherit;
}
.karma-button:hover {
  background: radial-gradient(circle at 32% 28%, #fb7575 0%, #f25151 30%, #c81e1e 65%, #7f0a0a 100%);
}
.karma-button:active {
  transform: translateY(6px);
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.2),
    inset 0 -6px 12px rgba(0, 0, 0, 0.4);
}
.karma-button .btn-amount {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -1px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
}
.karma-button.counting {
  animation: counting-pulse 1s ease-in-out infinite;
}
.karma-button.counting .btn-amount {
  font-size: 64px;
  font-weight: 600;
}
.karma-button:disabled { cursor: wait; }

@keyframes counting-pulse {
  0%, 100% { transform: translateY(0); box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.25), inset 0 -10px 18px rgba(0, 0, 0, 0.35); }
  50% { transform: translateY(2px); box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.25), inset 0 -10px 18px rgba(0, 0, 0, 0.35); }
}

@media (max-width: 480px) {
  .karma-button {
    width: 140px !important;
    height: 140px !important;
  }
  .karma-button .btn-amount { font-size: 30px; }
  .karma-button.counting .btn-amount { font-size: 52px; }
}

/* button label visible again, stacked under the amount */
.karma-button {
  flex-direction: column !important;
  gap: 0;
}
.karma-button .btn-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-top: 2px;
}
.karma-button.counting .btn-label {
  font-size: 18px;
  text-transform: lowercase;
  letter-spacing: 0;
  font-weight: 400;
  font-style: italic;
}
.karma-button.counting .btn-amount {
  font-size: 38px !important;
  font-weight: 500 !important;
}


.feed-more {
  color: #7c3aed;
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.feed-more:active { opacity: 0.6; }
