/* ================================================================
   app_cylinder.css — Magnus Rotor Simulator Page Styles
================================================================ */

/* ── Full-height page layout ── */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

nav {
  flex-shrink: 0;
}

.divider {
  flex-shrink: 0;
}

footer.footer {
  flex-shrink: 0;
}

/* Main two-column workspace layout */
.app-workspace {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* ── Left sidebar control panel ── */
.control-panel {
  background: var(--navy-mid);
  border: 1px solid rgba(200, 168, 75, 0.2);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow-y: auto;
  min-height: 0;
}

.panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--white);
  border-bottom: 1px solid rgba(200, 168, 75, 0.15);
  padding-bottom: 0.75rem;
}

/* ── Input groups & sliders ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--amber);
  display: flex;
  justify-content: space-between;
}

.input-label span {
  color: var(--white);
  font-family: monospace;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--navy-light);
  border: 1px solid rgba(200, 168, 75, 0.1);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--amber);
  border: 1px solid var(--white);
  cursor: pointer;
  transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ── Telemetry readout block ── */
.telemetry-deck {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(200, 168, 75, 0.1);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.telemetry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.telemetry-label {
  color: var(--muted);
}

.telemetry-val {
  font-family: monospace;
  font-size: 15px;
  color: var(--amber-light);
  font-weight: bold;
  transition: color 0.3s ease;
}

/* ── Flow Regime Info Box ── */
.regime-info-box {
  background: rgba(10, 22, 40, 0.7);
  border: 1px solid rgba(200, 168, 75, 0.15);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.regime-badge {
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #00ffcc;
  transition: color 0.4s ease;
}

.regime-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.regime-re {
  font-family: monospace;
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 1px;
}

.regime-bar-wrap {
  margin-top: 0.25rem;
}

.regime-bar-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.regime-bar-fill {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border: 2px solid var(--white);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.regime-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 12px;
}

/* ── Workspace Right Column (CAD Viewport) ── */
.workspace-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.viewport-container {
  background: #060d18;
  border: 1px solid rgba(200, 168, 75, 0.15);
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cad-toolbar {
  background: rgba(10, 22, 40, 0.8);
  border-bottom: 1px solid rgba(200, 168, 75, 0.15);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.cad-actions {
  display: flex;
  gap: 0.5rem;
}

.cad-btn {
  background: rgba(200, 168, 75, 0.05);
  border: 1px solid rgba(200, 168, 75, 0.3);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.cad-btn:hover {
  background: rgba(200, 168, 75, 0.15);
  border-color: var(--amber);
}

.aspect-ratio-hud {
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.aspect-ratio-hud span {
  color: var(--amber-light);
  font-weight: bold;
}

#canvas-3d-target {
  width: 100%;
  flex: 1;
  min-height: 0;
  cursor: grab;
}

#canvas-3d-target:active {
  cursor: grabbing;
}


/* ================================================================
   NEW INTERACTIVE THEORY & RESEARCH FULLSCREEN OVERLAY
================================================================ */

.theory-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 13, 24, 0.97); /* Match canvas depth layout */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000; /* Layers clear above navigation elements */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Toggled open via micro-interaction script class injection */
.theory-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.theory-modal {
  background: var(--navy-mid);
  border: 1px solid rgba(200, 168, 75, 0.25);
  width: 92%;
  max-width: 1160px;
  max-height: 85vh;
  padding: 3.5rem;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
}

/* Custom internal modal scroll track formatting */
.theory-modal::-webkit-scrollbar {
  width: 6px;
}
.theory-modal::-webkit-scrollbar-track {
  background: var(--navy-dark);
}
.theory-modal::-webkit-scrollbar-thumb {
  background: rgba(200, 168, 75, 0.3);
}

.theory-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: 1px solid rgba(200, 168, 75, 0.3);
  color: var(--amber);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theory-close:hover {
  background: var(--amber);
  color: var(--navy-dark);
  border-color: var(--amber);
}

/* Two-column responsive theory structural layout splits */
.theory-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  margin-top: 1rem;
}

.theory-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber);
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.theory-left h2, .theory-right h2 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 28px;
  margin-bottom: 0.75rem;
  font-weight: normal;
  line-height: 1.25;
}

.theory-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.75rem;
  letter-spacing: 0.5px;
}

.theory-left p, .theory-right p {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.25rem;
}

.theory-left h3 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 18px;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* Academic Equation Callout Housing */
.equation-box {
  background: rgba(10, 22, 40, 0.6);
  border-left: 3px solid var(--amber);
  padding: 1.5rem;
  margin: 2rem 0;
}

.eq-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.eq-math {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  color: var(--white);
  font-weight: bold;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.equation-box p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.equation-box strong {
  color: var(--amber-light);
}

/* Interactive tutorial structural list elements */
.tutorial-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}

.step-num {
  background: rgba(200, 168, 75, 0.08);
  border: 1px solid rgba(200, 168, 75, 0.4);
  color: var(--amber);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.step-text h4 {
  color: var(--white);
  font-size: 14px;
  margin-bottom: 0.35rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.step-text p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.theory-start-btn {
  width: 100%;
  background: var(--amber);
  color: var(--navy-dark);
  border: none;
  padding: 1.15rem;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theory-start-btn:hover {
  background: var(--white);
  color: var(--navy-dark);
}

/* Responsive adjustment rules for smaller preview configurations */
@media (max-width: 1024px) {
  .theory-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .theory-modal {
    padding: 2rem;
    max-height: 90vh;
  }
}