/**
 * Holodepth — Ortak İnteraktif Tool / Laboratuvar Tasarım Dili (Tool Design System)
 *
 * Estetik: Deep Obsidian, Hardware HUD, Hairline Glass, JetBrains Mono Telemetri.
 * Kullanım: WebGPU, 3D Gaussian Splatting, Shader/GLSL ve Performans laboratuvarları.
 */

/* ==========================================================================
   ANA KONTEYNER (OBSIDIAN CHASSIS)
   ========================================================================== */
.doc-tool {
  background: linear-gradient(180deg, #070a10 0%, #040508 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  margin: 2.25rem 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  position: relative;
}

/* ==========================================================================
   TEPE KONTROL BARI (HARDWARE TOOLBAR)
   ========================================================================== */
.doc-tool__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(11, 15, 24, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.doc-tool__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f0f4fc;
}

.doc-tool__title svg {
  color: rgba(220, 230, 245, 0.85);
  flex-shrink: 0;
}

/* Canlı Durum İndikatörü (Minimalist Hairline Dot) */
.doc-tool__status-dot,
.doc-tool__status-dot--purple,
.doc-tool__status-dot--green,
.doc-tool__status-dot--cyan {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(235, 242, 252, 0.85);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
  display: inline-block;
  animation: doc-tool-led-pulse 2.2s infinite ease-in-out;
}

@keyframes doc-tool-led-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.doc-tool__controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SEGMENTED CONTROL (MACOS / LINEAR STYLE GÖMÜLÜ ANAHTAR)
   ========================================================================== */
.doc-tool__switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset;
}

.doc-tool__switch-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(165, 180, 205, 0.72);
  padding: 0.38rem 0.85rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-tool__switch-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

/* Premium Monochrome Active State (No Blue / No Pink) */
.doc-tool__switch-btn.is-active,
.doc-tool__switch-btn--cyan.is-active,
.doc-tool__switch-btn--purple.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 250, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  font-weight: 600;
}

/* ==========================================================================
   HASSAS KAYDIRICI (PRECISION HARDWARE SLIDER)
   ========================================================================== */
.doc-tool__slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(145, 165, 190, 0.68);
}

.doc-tool__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.doc-tool__slider:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Minimalist Hardware Slider Thumb (Zero Glow, Platinum Dot) */
.doc-tool__slider::-webkit-slider-thumb,
.doc-tool__slider--cyan::-webkit-slider-thumb,
.doc-tool__slider--purple::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(235, 242, 252, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  border: 2px solid #060910;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.doc-tool__slider::-webkit-slider-thumb:hover,
.doc-tool__slider--cyan::-webkit-slider-thumb:hover,
.doc-tool__slider--purple::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.doc-tool__slider::-moz-range-thumb,
.doc-tool__slider--cyan::-moz-range-thumb,
.doc-tool__slider--purple::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(235, 242, 252, 0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  border: 2px solid #060910;
}

.doc-tool__slider-badge,
.doc-tool__slider-badge--cyan,
.doc-tool__slider-badge--purple {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(235, 242, 252, 0.92);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  min-width: 3.6rem;
  text-align: center;
}

/* ==========================================================================
   SIMÜLASYON SAHNESİ (BLUEPRINT OBSIDIAN VIEWPORT)
   ========================================================================== */
.doc-tool__stage {
  position: relative;
  width: 100%;
  height: 230px;
  background: #030407;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow: hidden;
}

.doc-tool__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sahne İçi Uyarı Bannerı (Overlay Warning) */
.doc-tool__stage-banner {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(220, 230, 245, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.doc-tool__stage-banner--warn {
  border-color: rgba(255, 92, 124, 0.35);
  color: #ff94aa;
}

.doc-tool__stage-banner--ok {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(235, 242, 252, 0.92);
}

/* ==========================================================================
   VEKTÖREL DONANIM İSTASYONLARI (RAZOR-SHARP HARDWARE STATIONS)
   Canvas pikselleşmesini önleyen, %100 kristal netliğinde HTML istasyon kartları
   ========================================================================== */
.doc-tool__station {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(180px, 24vw, 230px);
  padding: 0.75rem 1rem;
  background: rgba(6, 10, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none !important;
  z-index: 2;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-tool__station--cpu {
  left: clamp(1rem, 4vw, 2.75rem);
}

.doc-tool__station--gpu {
  right: clamp(1rem, 4vw, 2.75rem);
}

.doc-tool__station--warn {
  border-color: rgba(255, 92, 124, 0.28);
  background: rgba(16, 8, 12, 0.88);
  box-shadow: none !important;
}

.doc-tool__station--purple {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 18, 0.88);
  box-shadow: none !important;
}

.doc-tool__station-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(160, 180, 210, 0.75);
  margin-bottom: 0.35rem;
}

.doc-tool__station-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
  text-shadow: none;
  white-space: nowrap;
}

.doc-tool__station--warn .doc-tool__station-title {
  color: #ff94aa;
  text-shadow: none;
}

.doc-tool__station--purple .doc-tool__station-title {
  color: rgba(240, 245, 255, 0.95);
  text-shadow: none;
}

.doc-tool__station-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(220, 235, 255, 0.88);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-tool__station--warn .doc-tool__station-badge {
  background: rgba(255, 92, 124, 0.12);
  border-color: rgba(255, 92, 124, 0.25);
  color: #ffb8c6;
}

/* ==========================================================================
   TELEMETRİ HUD ALTI (FLIGHT INSTRUMENT TELEMETRY BAR)
   ========================================================================== */
.doc-tool__hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(8, 10, 16, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-tool__metric {
  padding: 0.75rem 1.15rem;
  transition: background 0.2s ease;
}

.doc-tool__metric:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.doc-tool__metric:hover {
  background: rgba(255, 255, 255, 0.015);
}

.doc-tool__metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.doc-tool__metric-label {
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(145, 165, 190, 0.62);
}

.doc-tool__metric-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.38rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(200, 215, 235, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.doc-tool__metric-tag--ok {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(205, 225, 245, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-tool__metric-tag--warn {
  background: rgba(255, 92, 124, 0.06);
  color: rgba(255, 140, 160, 0.88);
  border: 1px solid rgba(255, 92, 124, 0.18);
}

.doc-tool__metric-tag--purple {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(215, 210, 238, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-tool__metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  font-weight: 500;
  color: rgba(235, 242, 252, 0.93);
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-shadow: none !important;
}

.doc-tool__metric-val--cyan {
  color: rgba(225, 240, 252, 0.94);
  text-shadow: none !important;
}

.doc-tool__metric-val--purple {
  color: rgba(235, 232, 250, 0.94);
  text-shadow: none !important;
}

.doc-tool__metric-val--green {
  color: rgba(228, 245, 238, 0.94);
  text-shadow: none !important;
}

.doc-tool__metric-val--warn {
  color: rgba(255, 145, 160, 0.94);
  text-shadow: none !important;
}

.doc-tool__metric-unit {
  font-size: 0.72rem;
  font-weight: 450;
  color: rgba(145, 165, 190, 0.55);
}

/* ==========================================================================
   MOBİL & TABLET RESPONSIVE UYUMLULUK (TOUCH & MOBILE HUD SYSTEM)
   ========================================================================== */

/* Tablet & Küçük Ekranlar (<= 860px) */
@media (max-width: 860px) {
  .doc-tool__header {
    gap: 0.85rem;
    padding: 0.75rem 1rem;
  }

  .doc-tool__controls {
    gap: 0.85rem;
  }

  /* Sahne: Çakışmayı önlemek için istasyonları ve banner'ı kanvasın altına hizala */
  .doc-tool__stage {
    height: auto !important;
    min-height: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "canvas canvas"
      "banner banner"
      "station-cpu station-gpu";
    gap: 0.65rem;
    padding-bottom: 0.85rem;
    background: #030407;
  }

  .doc-tool__canvas,
  .curl-lab__canvas-wrap {
    grid-area: canvas;
    width: 100% !important;
    height: 220px !important;
    display: block;
    position: relative;
  }

  .doc-tool__stage-banner {
    grid-area: banner;
    position: static !important;
    transform: none !important;
    margin: 0.25rem 0.85rem 0;
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    box-shadow: none !important;
  }

  .doc-tool__station {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(8, 11, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .doc-tool__station--cpu {
    grid-area: station-cpu;
    margin-left: 0.85rem;
  }

  .doc-tool__station--gpu {
    grid-area: station-gpu;
    margin-right: 0.85rem;
  }

  .doc-tool__station-label {
    font-size: 0.58rem;
    margin-bottom: 0.25rem;
  }

  .doc-tool__station-title {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .doc-tool__station-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
  }

  /* HUD Metrikleri: 2x2 Dengeli Izgara */
  .doc-tool__hud {
    grid-template-columns: repeat(2, 1fr);
  }

  .doc-tool__metric:nth-child(2) {
    border-right: none;
  }

  .doc-tool__metric:nth-child(1),
  .doc-tool__metric:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
}

/* Orta Boy Mobil Ekranlar (<= 600px) */
@media (max-width: 600px) {
  .doc-tool__header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
  }

  .doc-tool__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: 100%;
  }

  .doc-tool__switch {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 2px;
  }

  .doc-tool__switch-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    text-align: center;
  }

  .doc-tool__slider-wrap {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 120px;
    justify-content: space-between;
  }

  .doc-tool__slider {
    flex: 1 1 auto;
    min-width: 55px;
    width: auto;
  }
}

/* Küçük Telefonlar (<= 480px) */
@media (max-width: 480px) {
  .doc-tool {
    margin: 1.5rem 0;
    border-radius: 10px;
  }

  .doc-tool__stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "canvas"
      "banner"
      "station-cpu"
      "station-gpu";
    gap: 0.45rem;
    padding-bottom: 0.75rem;
  }

  .doc-tool__canvas,
  .curl-lab__canvas-wrap {
    height: 195px !important;
  }

  .doc-tool__stage-banner {
    margin: 0.2rem 0.65rem 0;
    font-size: 0.68rem;
    padding: 0.35rem 0.65rem;
  }

  .doc-tool__station--cpu,
  .doc-tool__station--gpu {
    margin: 0 0.65rem;
  }

  .doc-tool__station {
    padding: 0.5rem 0.7rem;
  }

  .doc-tool__slider-wrap {
    flex: 1 1 100%;
  }

  .doc-tool__hud {
    grid-template-columns: 1fr;
  }

  .doc-tool__metric:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .doc-tool__metric {
    padding: 0.65rem 0.85rem;
  }

  .doc-tool__metric-label {
    font-size: 0.58rem;
  }

  .doc-tool__metric-val {
    font-size: 0.92rem;
  }
}
