:root {
  --bg: #13102b;
  --bg2: #1a1535;
  --card: rgba(255,255,255,0.045);
  --card-solid: #1e1a38;
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --text: #ede9fe;
  --muted: rgba(237,233,254,0.5);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(139,92,246,0.4);
  --soft: rgba(139,92,246,0.12);
  --green-bg: rgba(16,185,129,0.1);
  --green-border: rgba(16,185,129,0.25);
  --green-text: #6ee7b7;
  --orange-bg: rgba(245,158,11,0.1);
  --orange-border: rgba(245,158,11,0.25);
  --orange-text: #fcd34d;
  --red: #f87171;
  --green: #34d399;
  --yellow: #fbbf24;
  --pink: #f472b6;
  --black: #ede9fe;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(108,63,197,0.28) 0%, transparent 65%),
    linear-gradient(rgba(108,63,197,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,63,197,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

header {
  background: rgba(20,16,44,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 16px 140px 16px 20px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 80px;
}

.header-logo {
  flex: 0 0 auto;
  height: 60px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  object-fit: contain;
}

.header-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

header h1 {
  margin: 0 0 3px;
  font-size: 21px;
  letter-spacing: -0.3px;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff 30%, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  margin: 0;
  opacity: 0.55;
  font-size: 12px;
  color: var(--text);
  -webkit-text-fill-color: unset;
}

#notepad-toggle {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.35);
  color: #c4b5fd;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
#notepad-toggle:hover {
  background: rgba(139,92,246,0.28);
  border-color: rgba(139,92,246,0.6);
}

/* ── Floating Notepad ── */
#notepad {
  position: fixed;
  top: 90px;
  right: 30px;
  width: 340px;
  min-width: 220px;
  min-height: 160px;
  background: #fffde7;
  border: 1.5px solid #f9e44a;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  resize: both;
}
#notepad.open { display: flex; }
#notepad.minimized { min-height: unset; height: auto !important; resize: none; }

#notepad-header {
  background: #f9e44a;
  padding: 8px 12px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 12px 12px 0 0;
  font-weight: bold;
  font-size: 13px;
  color: #5a4a00;
}
#notepad-header:active { cursor: grabbing; }

.notepad-actions { display: flex; gap: 6px; }
.notepad-btn {
  background: rgba(0,0,0,0.1);
  border: none;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a4a00;
  transition: background 0.15s;
}
.notepad-btn:hover { background: rgba(0,0,0,0.2); }

#notepad-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
}
#notepad.minimized #notepad-body { display: none; }

#notepad textarea {
  flex: 1;
  width: 100%;
  min-height: 120px;
  border: none;
  background: transparent;
  resize: none;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #3a3000;
  outline: none;
  line-height: 1.6;
}
#notepad-char {
  font-size: 11px;
  color: #a08a00;
  text-align: right;
  margin-top: 4px;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 70px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(139,92,246,0.2);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
}

.section-title {
  margin: 22px 0 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.script-box {
  background: rgba(139,92,246,0.08);
  border-left: 3px solid var(--primary);
  padding: 8px 12px 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.script-box::before {
  content: '›';
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  flex: 0 0 auto;
}

.presentation-card { padding-bottom: 14px; }

.presentation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.presentation-header h2 { margin: 0; }

.presentation-toggle-icon {
  font-size: 26px;
  color: var(--primary);
  transition: transform 0.25s;
  line-height: 1;
  font-weight: 700;
}

.presentation-toggle-icon.collapsed { transform: rotate(-90deg); }

.presentation-body {
  overflow: hidden;
  transition: max-height 0.35s ease;
  max-height: 600px;
}

.presentation-body.collapsed { max-height: 0; }

.script-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.question-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.question-box strong {
  display: block;
  margin-bottom: 8px;
}

.main-question {
  font-weight: 700;
  margin: 12px 0 6px !important;
  font-size: 16px;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-question::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
  background: var(--black);
}

.q-red::before    { background: var(--red); }
.q-green::before  { background: var(--green); }
.q-yellow::before { background: var(--yellow); }
.q-pink::before   { background: var(--pink); }

.question-help {
  margin: 0 0 10px 30px !important;
  color: var(--muted);
  font-size: 13px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

label.option {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  transition: 0.15s ease;
  font-size: 13px;
  min-height: 34px;
  color: var(--text);
}

label.option::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  background: var(--muted);
}

label.option:hover {
  background: var(--soft);
  border-color: var(--border-hover);
}

input[type="checkbox"] {
  margin-top: 0;
  accent-color: var(--primary);
}

label.option.group-red::before    { background: var(--red); }
label.option.group-green::before  { background: var(--green); }
label.option.group-yellow::before { background: var(--yellow); }
label.option.group-pink::before   { background: var(--pink); }

label.option.group-red:hover    { background: rgba(248,113,113,0.1); }
label.option.group-green:hover  { background: rgba(52,211,153,0.1); }
label.option.group-yellow:hover { background: rgba(251,191,36,0.1); }
label.option.group-pink:hover   { background: rgba(244,114,182,0.1); }

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
textarea::placeholder { color: var(--muted); }

.buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.primary-btn   { background: var(--primary); color: white; }
.primary-btn:hover { background: var(--primary-dark); }
.secondary-btn { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.secondary-btn:hover { background: rgba(255,255,255,0.14); }

.result-empty {
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 16px;
  border: 1px dashed var(--border);
}

.result-block {
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.result-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.tag {
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(139,92,246,0.3);
}

.score-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  font-size: 14px;
}

.score-line:last-child { border-bottom: none; }

.say-box {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green-text);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
}

.internal-box {
  background: var(--orange-bg);
  border: 1px solid var(--orange-border);
  color: var(--orange-text);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .checks { grid-template-columns: 1fr; }
  header h1 { font-size: 23px; }
  main { padding: 18px 12px 50px; }
  .top-row { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════
   BLOQUE DECISIÓN DEMO
══════════════════════════════════════════════ */

.demo-decision-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(139,92,246,0.1);
  border: 1.5px solid rgba(139,92,246,0.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-decision-pregunta {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: #c4b5fd;
}

.demo-decision-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-si-btn  { background: #7c3aed; }
.demo-si-btn:hover { background: #6d28d9; }

.no-demo-block {
  margin-top: 14px;
  padding: 16px;
  background: var(--orange-bg);
  border: 1.5px solid var(--orange-border);
  border-radius: 14px;
  color: var(--orange-text);
  font-size: 14px;
  line-height: 1.7;
}

.no-demo-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--orange-text);
}

/* ══════════════════════════════════════════════
   SECCIÓN 4 — DURANTE LA DEMO
══════════════════════════════════════════════ */

.demo-section {
  border-top: 4px solid #f59e0b;
}

.demo-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.demo-section-header h2 { margin: 0 0 4px; }

.demo-section-sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.demo-badge {
  background: #f59e0b;
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  margin-top: 3px;
}

.demo-block {
  margin-bottom: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.demo-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--black);
  margin-bottom: 10px;
}

.demo-block-icon {
  font-size: 18px;
  line-height: 1;
}

.demo-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cierre-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.cierre-btn:hover { background: linear-gradient(135deg, #d97706, #b45309); }

/* ══════════════════════════════════════════════
   SECCIÓN 5 — CIERRE
══════════════════════════════════════════════ */

.cierre-block {
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.cierre-block h3 { margin: 0 0 8px; font-size: 15px; }

.temperatura-badge {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.temperatura-frio    { background: rgba(96,165,250,0.15); color: #93c5fd; border: 1px solid rgba(96,165,250,0.25); }
.temperatura-tibio   { background: rgba(251,191,36,0.12); color: #fcd34d; border: 1px solid rgba(251,191,36,0.25); }
.temperatura-caliente { background: rgba(251,146,60,0.12); color: #fdba74; border: 1px solid rgba(251,146,60,0.25); }
.temperatura-listo   { background: rgba(52,211,153,0.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.25); }

@media (max-width: 680px) {
  .demo-checks { grid-template-columns: 1fr; }
}
