/* ============================================================ */
/* Universe Timeline — Dark Space Theme                         */
/* ============================================================ */

:root {
  --bg-deep: #060a1a;
  --bg-panel: #0d1233;
  --bg-card: #141940;
  --bg-hover: #1a2050;
  --text-primary: #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted: #5c6bc0;
  --accent-cyan: #00e5ff;
  --accent-purple: #d500f9;
  --accent-gold: #ffd740;
  --accent-green: #69f0ae;
  --accent-red: #ff5252;
  --border: #283593;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* ============================================================ */
/* SCREENS                                                       */
/* ============================================================ */

.screen {
  display: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.screen.active { display: flex; }

/* ============================================================ */
/* TITLE SCREEN                                                  */
/* ============================================================ */

.title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at center, #0d1233 0%, #060a1a 70%);
}

.title-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff3, transparent),
    radial-gradient(1px 1px at 40% 70%, #fff2, transparent),
    radial-gradient(1px 1px at 60% 20%, #fff3, transparent),
    radial-gradient(1px 1px at 80% 60%, #fff2, transparent),
    radial-gradient(2px 2px at 10% 80%, #fff4, transparent),
    radial-gradient(2px 2px at 90% 10%, #fff4, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.title-text {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.title-universe { color: var(--accent-cyan); }
.title-timeline { color: var(--accent-purple); display: block; font-size: 3rem; }
.title-subtitle { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 48px; z-index: 1; }

.title-modes {
  display: flex;
  gap: 24px;
  z-index: 1;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 200px;
}
.mode-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.15);
}
.mode-icon { font-size: 2.5rem; margin-bottom: 12px; }
.mode-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.mode-desc { font-size: 0.85rem; color: var(--text-secondary); }

.sandbox-hint {
  position: absolute;
  bottom: 120px;
  color: var(--accent-gold);
  font-size: 0.9rem;
  animation: fadeInOut 3s ease;
}
@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 1; }
}

/* ============================================================ */
/* SHARED BUTTONS                                                */
/* ============================================================ */

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--accent-cyan); color: var(--text-primary); }

/* ============================================================ */
/* STORY MODE LAYOUT                                             */
/* ============================================================ */

.story-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.story-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.header-center { flex: 1; text-align: center; }
.header-center h2 { font-size: 1.2rem; color: var(--accent-cyan); }
.era-time { font-size: 0.8rem; color: var(--text-muted); }
.header-right { display: flex; gap: 8px; align-items: center; }

/* Era navigation bar */
.era-nav {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  gap: 12px;
  background: var(--bg-deep);
  border-bottom: 1px solid #1a1f4a;
}
.btn-era-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
.btn-era-nav:disabled { opacity: 0.3; cursor: default; }
.btn-era-nav:not(:disabled):hover { border-color: var(--accent-cyan); color: var(--text-primary); }

.era-map {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.era-map::-webkit-scrollbar { display: none; }

.era-map-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-card);
  border: 1px solid transparent;
}
.era-map-item.current { border-color: var(--accent-cyan); background: #0d1844; }
.era-map-item.completed { color: var(--accent-green); }
.era-map-item.locked { opacity: 0.35; cursor: default; }
.era-map-item:not(.locked):hover { border-color: var(--text-muted); }
.era-map-num { font-weight: 700; color: var(--accent-cyan); }
.era-map-check { color: var(--accent-green); }

/* Main story content */
.story-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.story-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  position: relative;
}
.era-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 16px;
}
.particle-canvas {
  flex: 1;
  border-radius: var(--radius);
  background: #0a0e1a;
  border: 1px solid var(--border);
}

.story-right {
  width: 380px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  overflow-y: auto;
  border-left: 1px solid #1a1f4a;
  background: var(--bg-panel);
}

/* ============================================================ */
/* PANELS                                                        */
/* ============================================================ */

.panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.panel-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

/* ============================================================ */
/* DIAL SLIDERS                                                  */
/* ============================================================ */

.dial-sliders { display: flex; flex-direction: column; gap: 20px; }

.dial-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dial-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.dial-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}
.dial-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  outline: none;
  cursor: pointer;
}
.dial-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 3px solid var(--accent-cyan);
  cursor: grab;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}
.dial-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 3px solid var(--accent-cyan);
  cursor: grab;
}
.dial-range {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.dial-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 215, 64, 0.1);
  border: 1px solid rgba(255, 215, 64, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
  font-size: 0.85rem;
  animation: fadeIn 0.3s ease;
}

/* ============================================================ */
/* CHOICE PANEL                                                  */
/* ============================================================ */

.choice-content { display: flex; flex-direction: column; gap: 16px; }
.choice-context {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}
.choice-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.choice-options { display: flex; flex-direction: column; gap: 8px; }
.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.choice-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  background: var(--bg-hover);
}
.choice-btn:disabled { cursor: default; opacity: 0.7; }
.choice-btn.correct { border-color: var(--accent-green); background: rgba(105, 240, 174, 0.1); }
.choice-btn.wrong { border-color: var(--accent-red); background: rgba(255, 82, 82, 0.1); }

.choice-feedback {
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  animation: fadeIn 0.3s ease;
}
.choice-feedback.correct { background: rgba(105, 240, 174, 0.08); border: 1px solid rgba(105, 240, 174, 0.3); }
.choice-feedback.wrong { background: rgba(255, 82, 82, 0.08); border: 1px solid rgba(255, 82, 82, 0.3); }
.feedback-icon { font-size: 1.5rem; margin-bottom: 8px; }
.feedback-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

.btn-continue {
  display: block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--accent-cyan);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.btn-continue:hover { background: #33e8ff; }

.choice-complete {
  text-align: center;
  padding: 24px;
}
.choice-complete h3 { color: var(--accent-green); margin-bottom: 8px; }

/* ============================================================ */
/* DISCOVERIES                                                   */
/* ============================================================ */

.discoveries-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.discovery-list { display: flex; flex-direction: column; gap: 6px; }
.discovery-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.discovery-item.found { background: rgba(105, 240, 174, 0.08); }
.discovery-check { font-size: 1rem; }
.discovery-label { color: var(--text-muted); }
.discovery-item.found .discovery-label { color: var(--text-primary); }

/* Discovery popup (toast) */
.discovery-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-panel);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius);
  padding: 20px 28px;
  max-width: 500px;
  z-index: 100;
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 8px 40px rgba(0, 229, 255, 0.2);
}
.discovery-popup.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.discovery-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.discovery-symbol { font-size: 1.5rem; font-weight: 700; }
.discovery-name { font-size: 1.2rem; font-weight: 600; }
.discovery-explanation { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.discovery-funfact {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent-gold);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 215, 64, 0.2);
}

/* Era complete banner */
.era-complete-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(90deg, rgba(105, 240, 174, 0.15), rgba(0, 229, 255, 0.15));
  border-bottom: 2px solid var(--accent-green);
  z-index: 90;
  animation: slideDown 0.4s ease;
}
.era-complete-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-green);
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ============================================================ */
/* SANDBOX MODE                                                  */
/* ============================================================ */

.sandbox-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.sandbox-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.sandbox-header h2 { flex: 1; font-size: 1.2rem; color: var(--accent-purple); }
.sandbox-stats { font-size: 0.8rem; color: var(--text-muted); }

.sandbox-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Forge area */
.sandbox-forge {
  width: 360px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border-right: 1px solid #1a1f4a;
  background: var(--bg-panel);
}

.forge-slots {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.forge-plus {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 700;
}

.sandbox-slot {
  width: 100px;
  height: 100px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: all 0.2s;
}
.sandbox-slot.active { border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); }
.sandbox-slot.filled { border-color: var(--accent-purple); }
.slot-empty { font-size: 2rem; color: var(--text-muted); }
.slot-symbol { font-size: 1.5rem; font-weight: 700; }
.slot-name { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }

.forge-actions {
  display: flex;
  gap: 8px;
}
.btn-combine, .btn-clear, .btn-toggle {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.btn-combine {
  background: var(--accent-cyan);
  color: var(--bg-deep);
}
.btn-combine:disabled { opacity: 0.3; cursor: default; }
.btn-combine:not(:disabled):hover { background: #33e8ff; }
.btn-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-clear:hover { border-color: var(--accent-red); color: var(--accent-red); }
.btn-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-toggle:hover { border-color: var(--accent-purple); color: var(--accent-purple); }

.sandbox-preview {
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 24px;
}
.sandbox-result {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}
.sandbox-result.success { background: rgba(105, 240, 174, 0.1); border: 1px solid rgba(105, 240, 174, 0.3); color: var(--accent-green); }
.sandbox-result.known { background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.3); color: var(--accent-cyan); }
.sandbox-result.failure { background: rgba(255, 82, 82, 0.08); border: 1px solid rgba(255, 82, 82, 0.3); color: var(--accent-red); animation: shake 0.4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* Element grid */
.sandbox-elements {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sandbox-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}
.sandbox-search:focus { border-color: var(--accent-cyan); }
.sandbox-search::placeholder { color: var(--text-muted); }
.sandbox-count { font-size: 0.75rem; color: var(--text-muted); }

.sandbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.sandbox-era-header {
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 12px 0 4px;
  border-bottom: 1px solid #1a1f4a;
}
.sandbox-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  width: 85px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
}
.sandbox-card:hover { border-color: var(--accent-cyan); background: var(--bg-hover); }
.sandbox-card.selected { border-color: var(--accent-purple); background: rgba(213, 0, 249, 0.1); }
.sandbox-symbol { font-size: 1.2rem; font-weight: 700; }
.sandbox-name { font-size: 0.65rem; color: var(--text-secondary); margin-top: 2px; text-align: center; }

/* ============================================================ */
/* ANIMATIONS                                                    */
/* ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================ */
/* SCROLLBAR                                                     */
/* ============================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================ */
/* RESPONSIVE                                                    */
/* ============================================================ */

@media (max-width: 900px) {
  .story-content { flex-direction: column; }
  .story-right { width: 100%; border-left: none; border-top: 1px solid #1a1f4a; max-height: 50vh; }
  .sandbox-content { flex-direction: column; }
  .sandbox-forge { width: 100%; border-right: none; border-bottom: 1px solid #1a1f4a; }
  .title-modes { flex-direction: column; }
  .title-text { font-size: 2.5rem; }
  .title-timeline { font-size: 2rem; }
}

@media (max-width: 600px) {
  .era-map-name { display: none; }
  .story-right { width: 100%; }
  .sandbox-card { width: 70px; }
}

/* ============================================================ */
/* SCORE DISPLAY                                                 */
/* ============================================================ */
.score-display {
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  padding: 4px 12px;
  background: rgba(255, 215, 64, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 215, 64, 0.2);
}
.score-float {
  position: absolute;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1.1rem;
  animation: scoreFloatUp 1.2s ease forwards;
  pointer-events: none;
}
@keyframes scoreFloatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* ============================================================ */
/* PROXIMITY FEEDBACK                                            */
/* ============================================================ */
.proximity-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.3s ease;
}
.proximity-feedback.level-1 {
  color: var(--text-secondary);
  background: rgba(159, 168, 218, 0.1);
  border: 1px solid rgba(159, 168, 218, 0.2);
}
.proximity-feedback.level-2 {
  color: var(--accent-gold);
  background: rgba(255, 215, 64, 0.1);
  border: 1px solid rgba(255, 215, 64, 0.3);
}
.proximity-feedback.level-3 {
  color: var(--accent-gold);
  background: rgba(255, 215, 64, 0.15);
  border: 1px solid rgba(255, 215, 64, 0.4);
  animation: proximityPulse 1s ease-in-out infinite;
}
.proximity-feedback.level-4 {
  color: #fff;
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid var(--accent-cyan);
  animation: proximityPulse 0.5s ease-in-out infinite;
}
@keyframes proximityPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Slider glow at high proximity */
.dial-slider.prox-high {
  box-shadow: 0 0 15px rgba(255, 215, 64, 0.4);
}
.dial-slider.prox-high::-webkit-slider-thumb {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 215, 64, 0.6);
}

/* ============================================================ */
/* CHOICE TIMER BAR                                              */
/* ============================================================ */
.choice-timer-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}
.choice-timer-inner {
  height: 100%;
  width: 100%;
  background: var(--accent-cyan);
  border-radius: 3px;
  transition: width 0.1s linear, background 0.3s;
}
.time-bonus {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
}

/* ============================================================ */
/* DISCOVERY POPUP DISMISS BUTTON                                */
/* ============================================================ */
.discovery-dismiss {
  display: block;
  margin-top: 12px;
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.discovery-dismiss:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

/* ============================================================ */
/* ERA TRANSITION OVERLAY                                        */
/* ============================================================ */
.era-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.era-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.era-transition-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-align: center;
  animation: eraFadeIn 0.6s ease;
}
@keyframes eraFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================ */
/* ERA STARS                                                      */
/* ============================================================ */
.era-stars {
  color: var(--accent-gold);
  font-size: 0.7rem;
  margin-left: 4px;
}

/* ============================================================ */
/* MENU PROGRESS INDICATORS                                      */
/* ============================================================ */
.mode-progress {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================ */
/* SANDBOX ENHANCEMENTS                                          */
/* ============================================================ */

/* combineHint tooltip on sandbox cards */
.sandbox-card[data-hint] {
  position: relative;
}
.sandbox-card[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.4;
  max-width: 200px;
  width: max-content;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.sandbox-card:hover[data-hint]::after {
  opacity: 1;
}

/* Forge hint below slots */
.sandbox-forge-hint {
  padding: 8px 14px;
  background: rgba(255, 215, 64, 0.08);
  border: 1px solid rgba(255, 215, 64, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: center;
}

/* Already-discovered muted style */
.sandbox-result.already-known {
  background: rgba(92, 107, 192, 0.1);
  border: 1px solid rgba(92, 107, 192, 0.3);
  color: var(--text-muted);
}

/* Failed combos list */
.sandbox-failed-combos {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.sandbox-failed-combos h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.failed-combo {
  font-size: 0.8rem;
  color: var(--accent-red);
  opacity: 0.6;
  padding: 2px 0;
}
.failed-combo s {
  text-decoration: line-through;
}

/* ============================================================ */
/* COMPLETION CEREMONY                                           */
/* ============================================================ */
.completion-stats {
  text-align: center;
}
.completion-stats h2 {
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.completion-stats p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.stat-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.completion-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
