/* ══════════════════════════════════════
   PORTAVOX — Story / Kapitel
══════════════════════════════════════ */

/* ── Kapitel-Karten ─────────────────── */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.chapter-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 2px;
  padding: 16px;
  min-height: 110px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.chapter-card:not(.locked):hover {
  border-color: var(--rare);
  box-shadow: 0 0 10px rgba(138, 72, 104, 0.15);
}

.chapter-card.locked {
  opacity: 0.35;
  filter: grayscale(0.8);
  cursor: default;
}

.chapter-card.active {
  border-color: var(--chaos);
  box-shadow: 0 0 14px rgba(200, 134, 10, 0.2);
  border-left-width: 2px;
}

.chapter-card.completed {
  border-color: var(--std);
}

.chapter-num {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--sub);
  margin-bottom: 8px;
}

.chapter-title {
  font-family: var(--font-lore);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1.3;
}

.chapter-check,
.chapter-lock {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 0.65rem;
  color: var(--sub);
}
.chapter-check { color: var(--std); }

/* ── Dialog-Bereich ─────────────────── */
.story-dialog {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  margin-top: 8px;
  align-items: start;
}

/* ── Hologramm-Kopf ─────────────────── */
.holo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.holo-container {
  width: 118px;
  height: 152px;
  position: relative;
  background: radial-gradient(ellipse 80% 70% at 50% 45%,
    rgba(106, 40, 80, 0.22) 0%,
    rgba(16, 8, 4, 0.9) 75%);
  border: 1px solid rgba(168, 72, 104, 0.45);
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 0 18px rgba(106, 40, 80, 0.5),
    0 0 40px rgba(106, 40, 80, 0.2),
    inset 0 0 24px rgba(106, 40, 80, 0.12);
  animation: holo-flicker 6s ease-in-out infinite;
}

/* Scan-Linien (CRT-Gitter) */
.holo-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(160, 60, 100, 0.06) 3px,
    rgba(160, 60, 100, 0.06) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Glüh-Rand oben/unten */
.holo-container::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 30px;
  top: 0;
  background: linear-gradient(180deg, rgba(106,40,80,0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.holo-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Laufender Scan-Streifen */
.holo-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200, 134, 10, 0.15) 20%,
    rgba(200, 134, 10, 0.5) 50%,
    rgba(200, 134, 10, 0.15) 80%,
    transparent 100%);
  animation: holo-scan 3s linear infinite;
  z-index: 3;
  pointer-events: none;
}

@keyframes holo-scan {
  from { top: -3px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  to   { top: 100%; opacity: 0; }
}

/* Hologramm-Flackern */
@keyframes holo-flicker {
  0%,  88%, 100% { opacity: 1;    filter: none; }
  89% { opacity: 0.80; filter: skewX(0.8deg) brightness(1.15); }
  90% { opacity: 1;    filter: none; }
  91% { opacity: 0.88; filter: skewX(-0.5deg); }
  92% { opacity: 1;    filter: brightness(1.1); }
  93% { opacity: 1;    filter: none; }
}

/* INSTANZ-Label unter dem Kopf */
.holo-label {
  font-family: var(--font-ui);
  font-size: 0.48rem;
  letter-spacing: 0.22em;
  color: rgba(168, 104, 128, 0.8);
  text-transform: uppercase;
  text-align: center;
}

/* SVG-Elemente */
.holo-head-path {
  fill: none;
  stroke: rgba(200, 90, 140, 0.75);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 2.5px rgba(200, 90, 140, 0.9));
}

.holo-detail {
  fill: none;
  stroke: rgba(200, 90, 140, 0.45);
  stroke-width: 0.9;
}

.holo-grid-h {
  stroke: rgba(200, 90, 140, 0.12);
  stroke-width: 0.6;
}

.holo-eye-ring {
  fill: none;
  stroke: rgba(200, 90, 140, 0.6);
  stroke-width: 0.9;
}

.holo-pupil {
  fill: rgba(200, 134, 10, 0.7);
  animation: pupil-glow 2.8s ease-in-out infinite;
}

@keyframes pupil-glow {
  0%, 100% { opacity: 0.7; r: 2.2; }
  50%       { opacity: 1.0; r: 2.8; }
}

/* Mundanimation beim Sprechen */
.holo-mouth {
  fill: none;
  stroke: rgba(200, 90, 140, 0.7);
  stroke-width: 1;
  transform-origin: 55px 95px;
  transition: transform 0.06s ease;
}

.holo-container.speaking .holo-mouth {
  animation: mouth-talk 0.12s ease-in-out infinite alternate;
}

@keyframes mouth-talk {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1.8); }
}

/* ── Dialog-Text ────────────────────── */
.dialog-text {
  background: rgba(30, 22, 12, 0.7);
  border: 1px solid var(--border2);
  border-left: 2px solid rgba(168, 72, 104, 0.5);
  border-radius: 2px;
  padding: 18px 20px;
  font-size: 0.93rem;
  line-height: 1.85;
  min-height: 120px;
  white-space: pre-wrap;
  font-family: var(--font-body);
  color: var(--white);
  font-style: italic;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
  position: relative;
}

.dialog-text::before {
  content: '▶';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.45rem;
  color: rgba(168, 72, 104, 0.6);
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Antwort-Buttons ────────────────── */
.choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.choice-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 9px 14px;
  border: 1px solid var(--border2);
  background: rgba(30, 22, 12, 0.6);
  color: var(--sub);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.choice-btn:hover {
  border-color: var(--chaos);
  color: var(--white);
  background: rgba(200, 134, 10, 0.07);
}

/* ── Responsive ─────────────────────── */
@media (max-width: 1100px) {
  .chapter-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .story-dialog { grid-template-columns: 1fr; }
  .holo-wrap { flex-direction: row; align-items: center; }
}
