/* ═══════════════════════════════════════════════════════════
   3615 SAMOURAÏ — MINITEL TERMINAL AESTHETIC
   ASCII art • Pixel font • CRT phosphor glow
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  /* Phosphor colors */
  --bg: #0a0a0a;
  --phosphor: #00ff88;
  --phosphor-dim: #00aa55;
  --phosphor-glow: #66ffbb;
  --accent: #ff6b35;
  --accent-glow: #ff9966;
  --white: #e0ffe8;
  --grid: #1a2a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  min-height: 100vh;
  /* display: flex; REMOVED to allow scrolling */
  /* align-items: center; REMOVED */
  /* justify-content: center; REMOVED */
  padding: 40px;
  /* More padding for desktop look */
  overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────── */
/* LAYOUT GRID                                                  */
/* ─────────────────────────────────────────────────────────── */

.studio-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-module {
  grid-column: 1 / -1;
  /* Span all columns */
  width: 100%;
}

.main-module {
  grid-column: 2;
  min-width: 400px;
  max-width: 600px;
}

.side-module {
  min-width: 300px;
  max-width: 400px;
}

/* ─────────────────────────────────────────────────────────── */
/* CRT MONITOR EFFECT                                          */
/* ─────────────────────────────────────────────────────────── */

.crt {
  position: relative;
  background: var(--bg);
  border-radius: 20px;
  padding: 40px;
  /* max-width: 600px; REMOVED - handled by layout */
  width: 100%;
  box-shadow:
    0 0 0 4px #222,
    0 0 0 8px #111,
    0 0 60px rgba(0, 255, 136, 0.15),
    inset 0 0 100px rgba(0, 255, 136, 0.03);

  /* CRT curvature */
  border-radius: 12px / 8px;
  margin-bottom: 20px;
  /* Spacing if stacked */
}

/* Scanlines overlay */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 1px,
      rgba(0, 0, 0, 0.2) 1px,
      rgba(0, 0, 0, 0.2) 2px);
  border-radius: inherit;
  z-index: 10;
}

/* Screen flicker animation */
.terminal {
  position: relative;
  animation: flicker 0.05s infinite alternate;
}

@keyframes flicker {
  0% {
    opacity: 0.98;
  }

  100% {
    opacity: 1;
  }
}

/* ─────────────────────────────────────────────────────────── */
/* TYPOGRAPHY                                                   */
/* ─────────────────────────────────────────────────────────── */

.terminal {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.8;
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-glow);
}

/* ─────────────────────────────────────────────────────────── */
/* ASCII ART HEADER                                             */
/* ─────────────────────────────────────────────────────────── */

.ascii-art {
  font-size: 8px;
  line-height: 1.2;
  color: var(--phosphor);
  text-shadow: 0 0 10px var(--phosphor-glow);
  margin-bottom: 16px;
  white-space: pre;
  overflow-x: auto;
}

.header-art {
  text-align: center;
}

/* ─────────────────────────────────────────────────────────── */
/* STATS ROW                                                    */
/* ─────────────────────────────────────────────────────────── */

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--phosphor-dim);
  border-bottom: 1px solid var(--phosphor-dim);
}

.stat-box {
  text-align: center;
  flex: 1;
}

.stat-num {
  display: block;
  font-size: 16px;
  color: var(--phosphor-glow);
  text-shadow: 0 0 12px var(--phosphor);
}

.stat-lbl {
  display: block;
  font-size: 8px;
  color: var(--phosphor-dim);
  margin-top: 4px;
}

.stat-box.accent .stat-num {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

/* ─────────────────────────────────────────────────────────── */
/* PROGRESS BAR                                                 */
/* ─────────────────────────────────────────────────────────── */

.progress-bar {
  font-size: 8px;
  color: var(--phosphor-dim);
  text-align: center;
  margin-bottom: 16px;
  white-space: pre;
}

/* ─────────────────────────────────────────────────────────── */
/* PROJECTS LIST                                                */
/* ─────────────────────────────────────────────────────────── */

.projects {
  margin-bottom: 8px;
}

.project-line {
  display: flex;
  align-items: center;
  padding: 4px 0;
  font-size: 9px;
}

.check {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
  margin-right: 8px;
}

.name {
  color: var(--white);
  flex-shrink: 0;
}

.dots {
  color: var(--phosphor-dim);
  opacity: 0.4;
  flex-shrink: 0;
}

.url {
  color: var(--phosphor-dim);
  font-size: 8px;
  margin-left: auto;
  text-decoration: none;
  /* If it becomes a link */
  transition: color 0.2s;
}

.url:hover {
  color: var(--phosphor);
  text-decoration: underline;
}

.project-desc {
  display: block;
  font-size: 7px;
  color: var(--phosphor-dim);
  opacity: 0.7;
  margin-left: 20px;
  /* Indent to align after check/cross roughly */
  margin-bottom: 8px;
  /* Space between items */
  max-width: 90%;
}

/* Progress Bar */
.progress-bar-container {
  position: relative;
  margin-left: 20px;
  margin-bottom: 6px;
  margin-top: 4px;
  height: 8px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--phosphor-dim);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor-glow);
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 100%);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-label {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 6px;
  color: var(--bg);
  text-shadow: none;
  font-weight: bold;
  z-index: 1;
  mix-blend-mode: difference;
}

.tags-row {
  margin-left: 20px;
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.tag {
  font-size: 6px;
  padding: 2px 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-alpha {
  border: 1px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 0 4px var(--accent-glow);
}

.tag-pre {
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  box-shadow: 0 0 4px var(--phosphor-glow);
}

.tag-beta {
  border: 1px solid #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 4px #00d4ff;
}

.tag-research {
  border: 1px solid #ffaa00;
  color: #ffaa00;
  box-shadow: 0 0 4px #ffaa00;
}

.tag-private {
  border: 1px solid #ff00ff;
  color: #ff00ff;
  box-shadow: 0 0 4px #ff00ff;
}

.killed-section {
  margin-top: 16px;
  opacity: 0.8;
}

.section-title {
  color: var(--accent);
  font-size: 8px;
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.killed .name,
.killed .url,
.killed .dots {
  color: var(--phosphor-dim);
  text-decoration: none;
  /* Ensure no underline on links initially */
}

.killed .name:hover {
  text-decoration: underline;
  cursor: pointer;
  color: var(--phosphor-dim);
  /* Keep dim color on hover for killed */
}

.cross {
  color: #ff4444;
  text-shadow: 0 0 8px #ff4444;
  margin-right: 8px;
}

/* Ideas specific */
.ideas-section {
  margin-top: 16px;
}

.ideas-section .section-title {
  color: var(--white);
  text-shadow: 0 0 8px var(--white);
}

.ideas-section .check {
  color: var(--phosphor-dim);
  text-shadow: none;
}

/* ─────────────────────────────────────────────────────────── */
/* TEAM ACTIVITIES MODULE                                       */
/* ─────────────────────────────────────────────────────────── */

.team-members {
  margin-bottom: 16px;
}

.members-label {
  font-size: 8px;
  color: var(--white);
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--white);
}

.members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 12px;
}

.member {
  font-size: 7px;
  color: var(--phosphor);
  padding: 2px 4px;
  border: 1px solid var(--phosphor-dim);
  border-radius: 2px;
  background: rgba(0, 255, 136, 0.05);
  text-shadow: 0 0 4px var(--phosphor-glow);
  transition: all 0.2s;
}

.member:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor-glow);
}

.dev-metrics {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--phosphor-dim);
}

.metrics-label {
  font-size: 8px;
  color: var(--accent);
  margin-bottom: 8px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 8px;
}

.metric-label {
  color: var(--phosphor-dim);
}

.metric-value {
  color: var(--phosphor-glow);
  text-shadow: 0 0 8px var(--phosphor);
  font-weight: bold;
  letter-spacing: 1px;
}

.report-button-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--phosphor-dim);
}

.report-btn {
  display: block;
  background: transparent;
  color: var(--phosphor);
  border: 1px solid var(--phosphor);
  padding: 6px 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 0 4px var(--phosphor-glow);
}

.report-btn:hover {
  background: var(--phosphor);
  color: var(--bg);
  box-shadow: 0 0 12px var(--phosphor);
  text-shadow: none;
}

.killed-title {
  font-size: 9px;
}


/* ─────────────────────────────────────────────────────────── */
/* SEPARATOR                                                    */
/* ─────────────────────────────────────────────────────────── */

.separator {
  font-size: 10px;
  color: var(--phosphor-dim);
  text-align: center;
  margin: 12px 0;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────── */
/* INPUT SECTION                                                */
/* ─────────────────────────────────────────────────────────── */

.input-section {
  padding: 12px 0;
}

.input-label {
  font-size: 9px;
  color: var(--white);
  margin-bottom: 8px;
}

.input-field {
  position: relative;
  margin-bottom: 12px;
}

.input-field input {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--phosphor-glow);
  text-shadow: 0 0 8px var(--phosphor);
  width: 100%;
  padding: 4px 0;
  outline: none;
  caret-color: var(--phosphor);
}

.input-field input::placeholder {
  color: transparent;
}

.dots-fill {
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--phosphor-dim);
  opacity: 0.3;
  pointer-events: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 0;
}

/* Blinking cursor */
.input-field input:focus {
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {

  0%,
  50% {
    border-right: 2px solid var(--phosphor);
  }

  51%,
  100% {
    border-right: 2px solid transparent;
  }
}

/* ─────────────────────────────────────────────────────────── */
/* COMMANDS ROW                                                 */
/* ─────────────────────────────────────────────────────────── */

.commands {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint {
  font-size: 8px;
  color: var(--phosphor-dim);
}

.cmd-btn {
  background: var(--phosphor);
  color: var(--bg);
  border: none;
  padding: 8px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  text-shadow: none;
  transition: all 0.1s;
}

.cmd-btn:hover {
  background: var(--phosphor-glow);
  box-shadow: 0 0 20px var(--phosphor);
}

.cmd-btn:active {
  transform: scale(0.98);
}

/* ─────────────────────────────────────────────────────────── */
/* CONFIRM MESSAGE                                              */
/* ─────────────────────────────────────────────────────────── */

.confirm-msg {
  font-size: 10px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
  text-align: center;
  margin-bottom: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* ─────────────────────────────────────────────────────────── */
/* SUCCESS BOX                                                  */
/* ─────────────────────────────────────────────────────────── */

.success-box {
  font-size: 8px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  text-align: center;
  white-space: pre;
}

/* ─────────────────────────────────────────────────────────── */
/* FOOTER                                                       */
/* ─────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Align items vertically */
  padding-top: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--phosphor-dim);
  font-size: 8px;
  color: var(--phosphor-dim);
}

.footer-link {
  color: var(--phosphor-dim);
  text-decoration: none;
  opacity: 0.5;
  font-size: 8px;
  transition: opacity 0.2s;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--phosphor);
}

/* ─────────────────────────────────────────────────────────── */
/* UTILITIES                                                    */
/* ─────────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────── */
/* RESPONSIVE                                                   */
/* ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .crt {
    padding: 24px;
    border-radius: 8px;
  }

  .ascii-art {
    font-size: 6px;
  }

  .stat-num {
    font-size: 12px;
  }

  .project-line .dots,
  .project-line .url {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────── */
/* BOOT SEQUENCE & ANIMATIONS                                   */
/* ─────────────────────────────────────────────────────────── */

.boot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Press Start 2P', monospace;
  color: var(--phosphor);
  font-size: 10px;
}

.boot-text {
  margin-bottom: 20px;
  text-align: center;
}

/* CRT Turn On Effect */
@keyframes turn-on {
  0% {
    transform: scale(1, 0.8) translate3d(0, 0, 0);
    filter: brightness(30);
    opacity: 1;
  }

  3.5% {
    transform: scale(1, 0.8) translate3d(0, 100%, 0);
  }

  3.6% {
    transform: scale(1, 0.8) translate3d(0, -100%, 0);
    opacity: 1;
  }

  9% {
    transform: scale(1.3, 0.6) translate3d(0, 100%, 0);
    filter: brightness(30);
    opacity: 0;
  }

  11% {
    transform: scale(1, 1) translate3d(0, 0, 0);
    filter: contrast(0) brightness(0);
    opacity: 0;
  }

  100% {
    transform: scale(1, 1) translate3d(0, 0, 0);
    filter: contrast(1) brightness(1.1) saturate(1.1);
    opacity: 1;
  }
}

.crt.turn-on {
  animation: turn-on 3s linear;
  animation-fill-mode: forwards;
}

/* Glitch Effect */
@keyframes glitch {

  2%,
  64% {
    transform: translate(2px, 0) skew(0deg);
  }

  4%,
  60% {
    transform: translate(-2px, 0) skew(0deg);
  }

  62% {
    transform: translate(0, 0) skew(5deg);
  }
}

.glitch {
  animation: glitch 3s infinite linear alternate-reverse;
}

/* Button Active State "Juice" */
.cmd-btn:active {
  transform: scale(0.95) translateY(2px);
  filter: brightness(0.8);
}

/* Loading Cursor */
.loading-cursor {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--phosphor);
  animation: rotate-cursor 1s infinite linear;
}

@keyframes rotate-cursor {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .studio-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .footer-module {
    grid-column: 1;
  }

  .main-module,
  .side-module {
    grid-column: 1;
    max-width: 100%;
    min-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BMAD TERMINAL STYLES
   Interactive PRD generation terminal with Claude + Mistral
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container */
#bmad-terminal {
  margin-top: 20px;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#bmad-terminal.hidden {
  display: none !important;
}

#bmad-terminal.slide-up {
  animation: bmad-slide-up 0.5s ease-out;
}

@keyframes bmad-slide-up {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bmad-terminal-inner {
  background: var(--bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow:
    0 0 0 3px #222,
    0 0 0 6px #111,
    0 0 40px rgba(0, 200, 255, 0.15),
    inset 0 0 60px rgba(0, 200, 255, 0.03);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.8;
  position: relative;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD HEADER                                                  */
/* ─────────────────────────────────────────────────────────── */

.bmad-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--phosphor-dim);
  padding-bottom: 16px;
}

.bmad-title {
  color: #00d4ff;
  text-shadow: 0 0 10px #00d4ff;
  font-size: 8px;
  white-space: pre;
  line-height: 1.2;
  margin-bottom: 12px;
}

.bmad-progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bmad-progress-label {
  color: var(--phosphor-dim);
  font-size: 8px;
}

.bmad-progress-track {
  color: #00d4ff;
  text-shadow: 0 0 8px #00d4ff;
  font-size: 10px;
  letter-spacing: 0;
}

.bmad-progress-pct {
  color: #00d4ff;
  font-size: 10px;
  text-shadow: 0 0 8px #00d4ff;
}

.bmad-phase-indicator {
  display: flex;
  gap: 16px;
  font-size: 8px;
}

.phase-dot {
  color: var(--phosphor-dim);
  opacity: 0.5;
  transition: all 0.3s;
}

.phase-dot.active {
  color: #00d4ff;
  text-shadow: 0 0 8px #00d4ff;
  opacity: 1;
}

.phase-dot.complete {
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-glow);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD CONTENT AREA                                            */
/* ─────────────────────────────────────────────────────────── */

#bmad-content {
  min-height: 100px;
  margin-bottom: 20px;
}

.bmad-loading {
  color: #00d4ff;
  text-shadow: 0 0 8px #00d4ff;
  font-size: 10px;
  padding: 20px 0;
}

.bmad-loading .blink {
  animation: bmad-blink 0.5s infinite;
}

@keyframes bmad-blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Claude Question */
.bmad-question {
  padding: 16px 0;
}

.bmad-question-label {
  color: #00d4ff;
  text-shadow: 0 0 10px #00d4ff;
  font-size: 10px;
  margin-bottom: 8px;
}

.bmad-question-text {
  color: var(--white);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  font-size: 11px;
  line-height: 2;
  min-height: 40px;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD SUGGESTION BOX (Mistral)                                */
/* ─────────────────────────────────────────────────────────── */

#bmad-input-area.hidden {
  display: none !important;
}

.bmad-suggestion-box {
  background: rgba(255, 170, 0, 0.05);
  border: 1px solid rgba(255, 170, 0, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.bmad-suggestion-label {
  color: #ffaa00;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
  font-size: 9px;
  margin-bottom: 8px;
}

.bmad-suggestion-text {
  color: #ffd080;
  font-size: 10px;
  line-height: 1.8;
  text-shadow: 0 0 4px rgba(255, 200, 100, 0.2);
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD ACTIONS                                                 */
/* ─────────────────────────────────────────────────────────── */

.bmad-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bmad-actions.hidden {
  display: none !important;
}

.bmad-hint {
  font-size: 8px;
  color: var(--phosphor-dim);
  flex: 1;
}

.bmad-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bmad-btn .key-hint {
  opacity: 0.6;
  font-size: 8px;
}

.bmad-btn-accept {
  background: var(--phosphor);
  color: var(--bg);
  box-shadow: 0 0 12px var(--phosphor);
}

.bmad-btn-accept:hover {
  background: var(--phosphor-glow);
  box-shadow: 0 0 20px var(--phosphor);
  transform: translateY(-2px);
}

.bmad-btn-reject {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.bmad-btn-reject:hover {
  background: rgba(255, 107, 53, 0.1);
  box-shadow: 0 0 12px var(--accent);
}

.bmad-btn-submit {
  background: #00d4ff;
  color: var(--bg);
  box-shadow: 0 0 12px #00d4ff;
}

.bmad-btn-submit:hover {
  background: #66e0ff;
  box-shadow: 0 0 20px #00d4ff;
}

.bmad-btn-download {
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  padding: 14px 24px;
  box-shadow: 0 0 20px var(--accent);
}

.bmad-btn-download:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 30px var(--accent);
  transform: translateY(-2px);
}

.bmad-btn-retry {
  background: #ff4444;
  color: white;
  margin-top: 12px;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD EDIT MODE                                               */
/* ─────────────────────────────────────────────────────────── */

.bmad-edit-mode.hidden {
  display: none !important;
}

.bmad-edit-label {
  color: var(--white);
  font-size: 9px;
  margin-bottom: 8px;
}

#bmad-edit-input {
  width: 100%;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid var(--phosphor-dim);
  border-radius: 6px;
  padding: 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--phosphor-glow);
  text-shadow: 0 0 4px var(--phosphor);
  resize: vertical;
  min-height: 60px;
  margin-bottom: 12px;
  outline: none;
}

#bmad-edit-input:focus {
  border-color: var(--phosphor);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

#bmad-edit-input::placeholder {
  color: var(--phosphor-dim);
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD COMPLETE STATE                                          */
/* ─────────────────────────────────────────────────────────── */

.bmad-complete.hidden {
  display: none !important;
}

.bmad-complete-box {
  font-size: 8px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
  text-align: center;
  white-space: pre;
  margin-bottom: 20px;
}

.bmad-download-area {
  text-align: center;
}

.bmad-prd-title {
  margin-top: 12px;
  font-size: 10px;
  color: var(--white);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD ERROR STATE                                             */
/* ─────────────────────────────────────────────────────────── */

.bmad-error {
  text-align: center;
  padding: 20px;
}

.bmad-error .error-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 12px;
  color: #ff4444;
  text-shadow: 0 0 12px #ff4444;
}

.bmad-error .error-text {
  color: #ff8888;
  font-size: 10px;
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────── */
/* BMAD RESPONSIVE                                              */
/* ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .bmad-terminal-inner {
    padding: 16px;
  }

  .bmad-title {
    font-size: 6px;
  }

  .bmad-phase-indicator {
    flex-direction: column;
    gap: 4px;
  }

  .bmad-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bmad-btn {
    justify-content: center;
  }
}

/* ─────────────────────────────────────────────────────────── */
/* ARCHITECTURE VIZ                                             */
/* ─────────────────────────────────────────────────────────── */

#arch-viz-container table {
  /* ASCII setup often uses pre or table, ensure it fits */
  display: block;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .arch-labels {
    flex-direction: column;
    height: 200px;
    /* Approximate based on 3d positions */
    justify-content: space-around;
    padding: 20px 0 !important;
    align-items: center;
  }
}