/* ═══ Layout ═══ */
.explorer-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--surface, #1a1a2e);
  border-bottom: 1px solid var(--border, #334155);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.header-left .eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3b82f6;
  margin: 0 0 0.15rem;
}

.header-left h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text, #e2e8f0);
  cursor: pointer;
}

.btn-action {
  background: var(--surface-2, #16213e);
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* ═══ Body ═══ */
.explorer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ═══ Canvas Panel ═══ */
.canvas-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080810;
  padding: 1.5rem;
  min-height: 400px;
}

.unit-circle-canvas {
  cursor: crosshair;
  max-width: 100%;
}

.canvas-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.75rem;
}

/* ═══ Values Panel ═══ */
.values-panel {
  width: 320px;
  background: var(--surface, #1a1a2e);
  border-left: 1px solid var(--border, #334155);
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.value-card {
  background: var(--surface-2, #16213e);
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid var(--border, #334155);
}

.card-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══ Angle ═══ */
.angle-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.angle-deg {
  font-size: 2rem;
  font-weight: 800;
  color: #3b82f6;
  font-variant-numeric: tabular-nums;
}

.angle-sep {
  color: #64748b;
  font-size: 1rem;
}

.angle-rad {
  font-size: 1rem;
  color: #a855f7;
  font-weight: 600;
}

.angle-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.angle-input {
  width: 60px;
  background: var(--surface, #1a1a2e);
  color: #e2e8f0;
  border: 1px solid var(--border, #334155);
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  text-align: center;
}

.angle-unit {
  color: #3b82f6;
  font-weight: 700;
}

.angle-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: linear-gradient(
    90deg,
    #3b82f6,
    #a855f7,
    #ef4444,
    #f59e0b,
    #3b82f6
  );
  border-radius: 3px;
  outline: none;
}

.angle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ═══ Trig Values ═══ */
.trig-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.trig-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trig-label {
  min-width: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.sin-label {
  color: #ef4444;
}
.cos-label {
  color: #3b82f6;
}
.tan-label {
  color: #10b981;
}
.csc-label {
  color: #f97316;
}
.sec-label {
  color: #a855f7;
}
.cot-label {
  color: #eab308;
}

.trig-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.trig-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.1s;
  position: absolute;
}

.sin-bar {
  background: #ef4444;
  left: 50%;
}
.cos-bar {
  background: #3b82f6;
  left: 50%;
}
.tan-bar {
  background: #10b981;
  left: 50%;
}

.trig-value {
  min-width: 65px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

/* ═══ Coordinate ═══ */
.coord-display {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.coord-text {
  color: #64748b;
}
.coord-x {
  color: #3b82f6;
}
.coord-y {
  color: #ef4444;
}

/* ═══ Quadrant ═══ */
.quadrant-visual {
  display: flex;
  justify-content: center;
}

.q-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 120px;
}

.q-cell {
  padding: 0.4rem;
  text-align: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
}

.q-cell.q-active {
  background: #3b82f620;
  color: #3b82f6;
  border: 1px solid #3b82f640;
}

/* ═══ Key Angles ═══ */
.angles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.angle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, #334155);
  border-radius: 6px;
  padding: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.angle-btn:hover {
  border-color: #3b82f6;
  background: #3b82f615;
}

.angle-btn.active {
  border-color: #3b82f6;
  background: #3b82f620;
  color: #3b82f6;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .explorer-body {
    flex-direction: column;
  }

  .values-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border, #334155);
    max-height: 50vh;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .value-card {
    flex: 1;
    min-width: 200px;
  }

  .canvas-panel {
    min-height: 300px;
  }
}
