/* THE CHAIR — Cinematic Layer
   Screen shake, micro-animations, blood-red crisis states,
   glowing hover systems, and war-room drama. */

/* ─── OPENING CINEMATIC ─────────────────────────── */
.oc-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.oc-overlay.oc-visible {
  opacity: 1;
  pointer-events: auto;
}
.oc-overlay.oc-out {
  opacity: 0;
  pointer-events: none;
}

.oc-inner {
  text-align: center;
  max-width: 580px;
  padding: 40px 24px;
  user-select: none;
}

/* Institution header — small-caps Orbitron, dim */
.oc-institution {
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 1.2vw, 0.62rem);
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.38);
  line-height: 2.2;
  opacity: 0;
  transform: translateY(6px);
  animation: oc-rise 0.8s ease forwards;
  animation-delay: 0.4s;
}
.oc-inst-line-2 {
  animation-delay: 0.75s;
}

/* Thin rule — expands from centre */
.oc-rule {
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 30px auto;
  animation: oc-rule-grow 0.7s ease forwards;
  animation-delay: 1.5s;
}

/* Main prose */
.oc-line {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  color: rgba(255, 255, 255, 0.93);
  line-height: 1.25;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
}
.oc-line-1 { animation: oc-rise 0.7s ease forwards; animation-delay: 2.0s; }
.oc-line-2 { animation: oc-rise 0.7s ease forwards; animation-delay: 2.55s; }
.oc-line-3 { animation: oc-rise 0.7s ease forwards; animation-delay: 3.1s; }

/* Punchline — Orbitron, restrained */
.oc-punchline {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 40px;
  opacity: 0;
  transform: translateY(6px);
  animation: oc-rise 0.8s ease forwards;
  animation-delay: 4.1s;
}

/* Continue prompt */
.oc-continue {
  font-family: var(--font-display);
  font-size: 0.5rem;
  letter-spacing: 0.38em;
  color: rgba(255, 255, 255, 0.18);
  margin-top: 52px;
  opacity: 0;
  animation: oc-rise 0.6s ease forwards;
  animation-delay: 5.4s;
}

@keyframes oc-rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes oc-rule-grow {
  to { width: 100px; }
}

/* Mobile tightening */
@media (max-width: 480px) {
  .oc-inner { padding: 32px 20px; }
  .oc-punchline { margin-top: 28px; }
  .oc-continue { margin-top: 36px; }
}

/* ─── SCREEN SHAKE ───────────────────────────────── */
@keyframes screen-shake {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  10%     { transform: translate(-3px, -2px) rotate(-0.3deg); }
  20%     { transform: translate(3px, 1px) rotate(0.2deg); }
  30%     { transform: translate(-2px, 3px) rotate(0.1deg); }
  40%     { transform: translate(2px, -2px) rotate(-0.2deg); }
  50%     { transform: translate(-3px, 1px) rotate(0.3deg); }
  60%     { transform: translate(3px, 2px) rotate(-0.1deg); }
  70%     { transform: translate(-1px, -3px) rotate(0.2deg); }
  80%     { transform: translate(1px, 2px) rotate(-0.3deg); }
  90%     { transform: translate(-2px, -1px) rotate(0.1deg); }
}
body.screen-shake {
  animation: screen-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ─── RATE CHANGE FLASH ──────────────────────────── */
@keyframes rate-flash-cut {
  0%   { background: rgba(0, 212, 255, 0); }
  15%  { background: rgba(0, 212, 255, 0.07); }
  100% { background: rgba(0, 212, 255, 0); }
}
@keyframes rate-flash-hike {
  0%   { background: rgba(220, 38, 38, 0); }
  15%  { background: rgba(220, 38, 38, 0.08); }
  100% { background: rgba(220, 38, 38, 0); }
}
body.flash-cut  .rate-flash-overlay { animation: rate-flash-cut  0.6s ease-out forwards; }
body.flash-hike .rate-flash-overlay { animation: rate-flash-hike 0.6s ease-out forwards; }

/* ─── HEARTBEAT (critical quarters) ─────────────── */
@keyframes heartbeat {
  0%, 100%  { transform: scale(1); }
  14%       { transform: scale(1.006); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.004); }
  70%       { transform: scale(1); }
}
body.critical-pulse .game-main {
  animation: heartbeat 1.2s ease-in-out 3;
}

/* ─── RECESSION FLASH ────────────────────────────── */
@keyframes recession-vignette {
  0%,100% { opacity: 0; }
  20%     { opacity: 1; }
  80%     { opacity: 0.6; }
}
.recession-vignette-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(153,27,27,0.35) 100%);
  opacity: 0;
  transition: opacity 1.5s ease;
}
body.recession .recession-vignette-overlay { opacity: 1; }

/* ─── DRAMATIC HEADER ────────────────────────────── */
.game-header {
  background: linear-gradient(180deg, #0a0f1e 0%, #080d18 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.8), 0 4px 20px rgba(0,0,0,0.6) !important;
}
.gh-brand {
  letter-spacing: 0.4em !important;
  text-shadow: 0 0 20px rgba(0,212,255,0.5);
}

/* ─── LIVE INDICATOR ─────────────────────────────── */
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 0.55rem;
  letter-spacing: 0.25em; color: rgba(255,255,255,0.35);
}
.live-dot-red {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blood-bright);
  box-shadow: 0 0 8px var(--blood-glow);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 8px var(--blood-glow); }
  50%     { opacity: 0.5; box-shadow: 0 0 3px var(--blood-glow); }
}

/* ─── BLOOD RED CRITICAL STATES ──────────────────── */
body.recession .news-bar {
  background: linear-gradient(90deg, rgba(153,27,27,0.4), rgba(8,13,24,0.95)) !important;
  border-bottom-color: rgba(220,38,38,0.35) !important;
}
body.recession .news-label {
  background: var(--blood) !important;
  box-shadow: 0 0 20px var(--blood-glow);
}
body.recession .economy-status {
  border-color: var(--blood-bright) !important;
  color: var(--blood-bright) !important;
  background: var(--blood-dim) !important;
  box-shadow: 0 0 12px var(--blood-glow) !important;
}

/* ─── ENHANCED RATE BUTTONS ──────────────────────── */
.rate-btn {
  position: relative; overflow: hidden;
  letter-spacing: 0.05em;
}
.rate-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.rate-btn:hover::after { opacity: 1; }

.rate-btn.cut:hover {
  border-color: var(--cyan) !important;
  color: var(--cyan) !important;
  background: rgba(0,212,255,0.1) !important;
  box-shadow: 0 0 20px rgba(0,212,255,0.25), inset 0 1px 0 rgba(0,212,255,0.1) !important;
}
.rate-btn.hold:hover {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  background: rgba(232,148,10,0.1) !important;
  box-shadow: 0 0 20px rgba(232,148,10,0.2) !important;
}
.rate-btn.hike:hover {
  border-color: var(--blood-bright) !important;
  color: var(--blood-bright) !important;
  background: var(--blood-dim) !important;
  box-shadow: 0 0 20px var(--blood-glow), inset 0 1px 0 rgba(220,38,38,0.1) !important;
}

/* ─── SUBMIT BUTTON — MORE DRAMATIC ─────────────── */
.submit-btn {
  background: linear-gradient(135deg, #0ea5e9, #0077aa) !important;
  border: 1px solid rgba(0,212,255,0.4) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.5) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.submit-btn:hover {
  background: linear-gradient(135deg, #22c5f5, #009ccf) !important;
  box-shadow: 0 0 28px rgba(0,212,255,0.5), 0 4px 24px rgba(0,0,0,0.4) !important;
  transform: translateY(-2px) !important;
}

/* ─── PANEL BORDERS — SHARPER ────────────────────── */
.panel.glass {
  border: 1px solid rgba(255,255,255,0.055) !important;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 24px 60px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

/* ─── PANEL TITLES ───────────────────────────────── */
.panel-title {
  background: linear-gradient(180deg, rgba(0,212,255,0.05) 0%, transparent 100%) !important;
  text-shadow: 0 0 16px rgba(0,212,255,0.4);
}

/* ─── FEED CARDS — TIGHTER ───────────────────────── */
.feed-card {
  background: rgba(13, 21, 37, 0.9) !important;
  border-color: rgba(255,255,255,0.05) !important;
}
.feed-card:hover {
  border-color: rgba(0,212,255,0.2) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
  transform: translateX(2px);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* ─── SCENARIO CARDS ─────────────────────────────── */
.ss-card {
  background: rgba(12, 18, 32, 0.9) !important;
  border-color: rgba(255,255,255,0.06) !important;
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s, box-shadow 0.25s !important;
}
.ss-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(0,212,255,0.5) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 30px rgba(0,212,255,0.15) !important;
}

/* ─── MODAL BACKDROPS — DARKER ───────────────────── */
.modal-backdrop {
  background: rgba(2, 4, 10, 0.92) !important;
  backdrop-filter: blur(16px) !important;
}

/* ─── COMMODITIES STRIP ──────────────────────────── */
.commodities-strip {
  border-top: 1px solid rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  background: rgba(5,8,15,0.6) !important;
}

/* ─── NEWS BAR REFINED ───────────────────────────── */
.news-bar {
  background: rgba(5, 8, 15, 0.98) !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}
.news-bar.alert .news-label {
  background: var(--gold) !important;
  color: #000 !important;
}
.news-bar.critical .news-label {
  background: var(--blood) !important;
  animation: live-pulse 0.8s infinite !important;
}

/* ─── QUARTERLY GRADE BLOCK ──────────────────────── */
.quarterly-grade-block {
  background: linear-gradient(180deg, rgba(0,10,25,0.5) 0%, rgba(5,8,15,0.2) 100%) !important;
  border-top: 1px solid rgba(255,255,255,0.05) !important;
}

/* ─── ADVISOR BLOCK ──────────────────────────────── */
.advisor-block {
  background: rgba(5,8,15,0.4) !important;
}
.adv-message {
  background: rgba(10,15,28,0.9) !important;
  border-left: 2px solid rgba(0,212,255,0.4) !important;
  font-style: italic;
}

/* ─── PROGRESS BAR ───────────────────────────────── */
.progress-fill {
  background: linear-gradient(90deg, var(--cyan), var(--blood-bright)) !important;
  box-shadow: 0 0 8px rgba(0,212,255,0.3) !important;
}

/* ─── GAMEOVER PANEL ─────────────────────────────── */
#gameover-panel {
  box-shadow: 0 0 80px rgba(0,0,0,0.9), 0 0 40px rgba(0,212,255,0.05) !important;
}

/* ─── INSTITUTIONAL METRICS ──────────────────────── */
.im-item {
  background: rgba(8,12,24,0.8) !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
}
.im-item:hover {
  border-color: rgba(0,212,255,0.15) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

/* ─── BRIEFING OVERLAY ───────────────────────────── */
#briefing-overlay {
  background: rgba(2, 4, 10, 0.97) !important;
}
.briefing-panel {
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 40px 100px rgba(0,0,0,0.9), 0 0 60px rgba(0,212,255,0.04) !important;
}
.bp-take-btn {
  background: linear-gradient(135deg, #0ea5e9, #0077aa) !important;
  box-shadow: 0 4px 24px rgba(0,212,255,0.3) !important;
}
.bp-take-btn:hover {
  box-shadow: 0 6px 32px rgba(0,212,255,0.5) !important;
}

/* ─── TERMINAL ───────────────────────────────────── */
#terminal-bar {
  background: rgba(3, 6, 12, 0.95) !important;
  border: 1px solid rgba(0,212,255,0.12) !important;
  border-radius: var(--r-sm) !important;
}

/* ─── MARKET REACTION MODAL ──────────────────────── */
.mr-modal {
  box-shadow: 0 40px 80px rgba(0,0,0,0.9) !important;
}

/* ─── SENATE HEARING ─────────────────────────────── */
.sh-modal {
  box-shadow: 0 40px 80px rgba(0,0,0,0.9), 0 0 40px rgba(220,38,38,0.06) !important;
}
.sh-response-btn:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}
