/* ============================================
   G.R.I.P. Platform — Active Session
   ============================================ */

/* ---- Timer Bar ---- */
.timer-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.timer-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 1s linear;
  box-shadow: var(--glow-cyan-sm);
}

.timer-bar__fill--warning {
  background: var(--color-warning);
  box-shadow: var(--glow-warning);
}

.timer-bar__fill--critical {
  background: var(--color-error);
  box-shadow: var(--glow-error);
  animation: pulse-bar 0.8s ease infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.timer-display__time {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
}

.timer-display__time--warning {
  color: var(--color-warning);
}

.timer-display__time--critical {
  color: var(--color-error);
  animation: pulse-text 0.8s ease infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.timer-display__scenario-count {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ---- Difficulty Indicator ---- */
.difficulty {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.difficulty__dots {
  display: flex;
  gap: 3px;
}

.difficulty__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.difficulty--easy .difficulty__dot:nth-child(-n+1) {
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}

.difficulty--easy {
  color: var(--color-success);
}

.difficulty--medium .difficulty__dot:nth-child(-n+2) {
  background: var(--color-warning);
  box-shadow: 0 0 6px rgba(255, 184, 0, 0.4);
}

.difficulty--medium {
  color: var(--color-warning);
}

.difficulty--hard .difficulty__dot:nth-child(-n+3) {
  background: var(--color-error);
  box-shadow: 0 0 6px rgba(255, 64, 96, 0.4);
}

.difficulty--hard {
  color: var(--color-error);
}

/* ---- Scenario Card ---- */
.scenario-card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  animation: fadeIn 0.3s ease;
}

.scenario-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.scenario-card__category {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scenario-card__prompt {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.scenario-card__context {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent-muted);
  margin-bottom: var(--space-6);
}

/* ---- Answer Options ---- */
.answer-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.answer-btn {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-all);
}

.answer-btn:hover {
  border-color: var(--color-accent-muted);
  background: var(--color-bg-elevated);
}

.answer-btn--selected {
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
  box-shadow: var(--glow-cyan-sm);
}

.answer-btn--correct {
  border-color: var(--color-success);
  background: var(--color-success-dim);
  box-shadow: var(--glow-success);
}

.answer-btn--incorrect {
  border-color: var(--color-error);
  background: var(--color-error-dim);
}

.answer-btn--disabled {
  pointer-events: none;
  opacity: 0.7;
}

.answer-btn__key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: var(--transition-all);
}

.answer-btn:hover .answer-btn__key {
  background: var(--color-accent-muted);
  color: var(--color-accent);
}

.answer-btn--selected .answer-btn__key {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.answer-btn--correct .answer-btn__key {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.answer-btn--incorrect .answer-btn__key {
  background: var(--color-error);
  color: #fff;
}

.answer-btn__text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  padding-top: var(--space-1);
}

/* ---- Biometric Panels ---- */
.biometric-panels {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  min-height: 400px;
}

.biometric-panel {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  flex: 1;
}

.biometric-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.biometric-panel__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

.biometric-panel__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.biometric-panel__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.biometric-panel__indicator--offline {
  background: var(--color-text-muted);
  box-shadow: none;
}

.biometric-panel__indicator--connecting {
  background: var(--color-warning);
  box-shadow: 0 0 6px rgba(255, 184, 0, 0.5);
  animation: pulse-dot 1.2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.biometric-panel__value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.biometric-panel__canvas-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}

.biometric-panel__canvas-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---- NFI Gauge ---- */
.nfi-gauge {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}

.nfi-gauge__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.nfi-gauge__canvas-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-3);
}

.nfi-gauge__canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.nfi-gauge__score {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  text-shadow: var(--text-glow-cyan);
  line-height: 1;
}

.nfi-gauge__descriptor {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

/* ---- Session Controls ---- */
.session-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.session-controls__left,
.session-controls__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .scenario-card {
    padding: var(--space-4);
  }

  .scenario-card__prompt {
    font-size: var(--text-base);
  }

  .nfi-gauge__canvas-wrap {
    width: 140px;
    height: 140px;
  }

  .nfi-gauge__score {
    font-size: var(--text-3xl);
  }

  .biometric-panel__canvas-wrap {
    height: 90px;
  }
}
