@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0f1c;
  --panel: #111a2c;
  --panel-soft: #141f32;
  --border: #1f2c44;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --accent: #5de4c7;
  --accent-2: #7c91ff;
  --danger: #ef4444;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(124, 145, 255, 0.08), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(93, 228, 199, 0.06), transparent 28%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 18px;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header,
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.title-stack h1 {
  margin: 4px 0;
}

.section {
  background: var(--panel);
  padding: 20px;
  margin: 16px 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 100%;
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 12px 14px;
  margin-top: 10px;
  background: linear-gradient(145deg, #0f172a, #0b1424);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(93, 228, 199, 0.15);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.decision-card {
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: left;
  background: linear-gradient(145deg, #0f172a, #0d1526);
  overflow-wrap: anywhere;
}

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 6px;
}

.decision-input {
  font-size: 18px;
  min-height: 56px;
  resize: none;
  overflow: hidden;
}

.option-title {
  font-size: 16px;
  resize: none;
  overflow: hidden;
  min-height: 48px;
}

.decision-display {
  color: var(--accent);
  font-weight: 700;
  margin: 12px 0 0;
  font-size: 20px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.option {
  background: linear-gradient(160deg, #0f172a, #111d30);
  padding: 18px;
  margin-top: 15px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  width: 100%;
}

.option-split {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
  width: 100%;
}

.option-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.col-title {
  font-weight: 700;
  font-size: 14px;
}

.pros-title {
  color: #22c55e;
}

.cons-title {
  color: #f87171;
}

.points {
  border: 1px dashed #334155;
  border-radius: 14px;
  padding: 10px;
  background: #0c1425;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.points .list {
  margin: 0;
}

.points .list:empty::before {
  content: attr(data-placeholder);
  color: #64748b;
  font-size: 13px;
}

.list {
  margin-top: 10px;
}

.list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  animation: slideIn 0.2s ease;
  position: relative;
}

.list li button {
  flex: 0 0 auto;
  align-self: center;
}

.list input {
  flex: 1;
  background: #0f172a;
  min-width: 0;
}
.list textarea {
  flex: 1;
  background: #0f172a;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 54px;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  padding: 10px 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.col-divider {
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-divider span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: #111827;
}

.pill-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1221;
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pill-btn.danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #0b1221;
}

.pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.option-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

button {
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #0b1221;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ghost.danger {
  border-color: var(--danger);
  color: #fca5a5;
}

.delete-btn {
  background: #ef4444;
  color: #0b1221;
}

.ghost.danger.delete-btn {
  border-color: #f87171;
  color: #fca5a5;
  background: transparent;
}

.ghost.danger.delete-btn:hover {
  background: rgba(248, 113, 113, 0.1);
}

.decision-list {
  display: grid;
  gap: 12px;
}

.decision-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: left;
}

.card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.muted {
  color: #94a3b8;
  margin: 4px 0;
  text-align: left;
}

.decision-card h3 {
  margin: 0 0 4px;
  text-align: left;
}

.small {
  font-size: 12px;
}

.empty-state {
  color: #94a3b8;
  padding: 10px 0;
}

.app-name {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar button,
.header button {
  margin-top: 0;
}

#result {
  margin-top: 20px;
  white-space: pre-line;
}

.summary-decision-title {
  text-align: center;
  font-size: 22px;
  margin: 10px 0 16px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.summary-choices {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-choice {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.choice-title {
  text-align: center;
  margin: 4px 0 12px;
  font-size: 18px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.summary-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.summary-grid th,
.summary-grid td {
  width: 50%;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--border);
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
  box-sizing: border-box;
}

.summary-grid th {
  background: #132137;
  font-weight: 600;
}

.summary-grid tbody tr:hover {
  background: #172845;
}

.cell-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.modal h3 {
  margin: 0 0 8px;
}

.modal input {
  width: 100%;
  max-width: 100%;
}

.modal textarea {
  width: 100%;
  max-width: 100%;
  resize: none;
  overflow: hidden;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.error-text {
  color: #f87171;
  margin: 6px 0 0;
  font-size: 13px;
}

.modal .danger {
  background: #ef4444;
  color: #0b1221;
}

@media (max-width: 720px) {
  .header,
  .top-bar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .section {
    padding: 16px;
  }

  .decision-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .option-split {
    flex-direction: column;
  }

  .col-divider {
    display: none;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
