/* ==========================================================================
   ETLEGIS — Виджет студийной настройки фирменного 3D-знака
   Интерактивная панель параметров геометрии, фаски, скругления и оптики
   ========================================================================== */

.mark-tuner-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(20, 22, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 197, 131, 0.4);
  border-radius: 999px;
  color: #F5E8D0;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(197, 160, 89, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.v10-tuner-dock .mark-tuner-btn {
  position: relative;
  bottom: auto;
  right: auto;
}

.mark-tuner-btn:hover {
  background: rgba(30, 34, 44, 0.95);
  border-color: #E5C583;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(229, 197, 131, 0.35);
}

.mark-tuner-btn .btn-icon {
  width: 18px;
  height: 18px;
  stroke: #E5C583;
  transition: transform 0.4s ease;
}

.mark-tuner-btn:hover .btn-icon {
  transform: rotate(45deg);
}

/* ================= САМА ПАНЕЛЬ НАСТРОЙКИ (HUD) ================= */
.mark-tuner-panel {
  position: fixed;
  bottom: 84px;
  left: 24px;
  right: auto;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  z-index: 1000;
  background: rgba(14, 16, 22, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: #E6E4DF;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mark-tuner-panel.dock-right {
  left: auto !important;
  right: 24px !important;
}

.mark-tuner-panel.open,
.mark-tuner-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Шапка панели */
.tuner-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
  cursor: grab;
}

.tuner-hdr:active {
  cursor: grabbing;
}

.tuner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.tuner-title svg {
  color: #E5C583;
}

.tuner-hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuner-btn-icon {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tuner-btn-icon:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Вкладки */
.tuner-tabs {
  display: flex;
  flex-wrap: wrap;
  padding: 8px 12px;
  gap: 5px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tuner-tab-btn {
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #94A3B8;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tuner-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.tuner-tab-btn.active {
  color: #0E1016;
  background: #E5C583;
  border-color: #E5C583;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(229, 197, 131, 0.35);
}

/* Контент панели */
.tuner-content {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
}

.tuner-content::-webkit-scrollbar {
  width: 5px;
}

.tuner-content::-webkit-scrollbar-thumb {
  background: rgba(229, 197, 131, 0.3);
  border-radius: 4px;
}

.tuner-tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tuner-tab-pane.active {
  display: flex;
}

/* Элементы управления (поля, слайдеры, чекбоксы) */
.tuner-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tuner-row-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94A3B8;
}

.tuner-label {
  font-weight: 500;
  color: #CBD5E1;
}

.tuner-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #E5C583;
  font-weight: 600;
}

.tuner-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  transition: background 0.2s;
}

.tuner-slider:hover {
  background: rgba(255, 255, 255, 0.16);
}

.tuner-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #E5C583;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(229, 197, 131, 0.6);
  transition: transform 0.15s ease;
}

.tuner-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.tuner-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.tuner-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.tuner-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tuner-slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s;
  border-radius: 20px;
}

.tuner-slider-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.tuner-switch input:checked + .tuner-slider-round {
  background-color: #C5A059;
}

.tuner-switch input:checked + .tuner-slider-round:before {
  transform: translateX(18px);
}

/* Блок селектора точек (Vertex Inspector) */
.tuner-vertex-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tuner-vertex-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 110px;
  overflow-y: auto;
  padding: 2px;
}

.tuner-vertex-chip {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s;
}

.tuner-vertex-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.tuner-vertex-chip.selected {
  background: #E5C583;
  color: #0E1016;
  border-color: #E5C583;
  font-weight: 700;
}

.tuner-btn-group {
  display: flex;
  gap: 8px;
}

.tuner-sub-btn {
  flex: 1;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tuner-sub-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.tuner-sub-btn.gold {
  background: rgba(229, 197, 131, 0.15);
  border-color: rgba(229, 197, 131, 0.35);
  color: #E5C583;
}

.tuner-sub-btn.gold:hover {
  background: #E5C583;
  color: #0E1016;
}

/* Пресеты */
.tuner-preset-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
}

.tuner-preset-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #E5C583;
}

.tuner-preset-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.tuner-preset-desc {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.4;
}

/* Нижний блок экспорта */
.tuner-ftr {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
}

.tuner-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.tuner-action-btn.primary {
  background: #C5A059;
  color: #0E1016;
}

.tuner-action-btn.primary:hover {
  background: #E5C583;
}

.tuner-action-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
}

.tuner-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* Маркеры вершин на 3D сцене */
.vertex-marker-2d {
  position: absolute;
  pointer-events: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(14, 16, 22, 0.85);
  border: 1.5px solid #00E5FF;
  color: #00E5FF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  z-index: 50;
  transition: border-color 0.2s, background 0.2s;
}

.vertex-marker-2d.active {
  border-color: #E5C583;
  color: #0E1016;
  background: #E5C583;
  box-shadow: 0 0 12px rgba(229, 197, 131, 0.9);
  transform: translate(-50%, -50%) scale(1.25);
}

/* ================= СТУДИЙНЫЙ ВИДЖЕТ НАСТРОЙКИ КАРТОЧЕК ================= */
.card-tuner-panel {
  position: fixed;
  bottom: 84px;
  left: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  z-index: 1000;
  background: rgba(14, 16, 22, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: #E6E4DF;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-tuner-panel.open,
.card-tuner-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.card-tuner-btn {
  position: relative;
  bottom: auto;
  left: auto;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(20, 22, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 197, 131, 0.4);
  border-radius: 999px;
  color: #F5E8D0;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(197, 160, 89, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.card-tuner-btn:hover {
  background: rgba(30, 34, 44, 0.95);
  border-color: #E5C583;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(229, 197, 131, 0.35);
}

.card-tab-btn {
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.card-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.card-tab-btn.active {
  color: #0E1016;
  background: #E5C583;
  font-weight: 600;
}

.card-tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.card-tab-pane.active {
  display: flex;
}

/* ================= СТУДИЙНЫЙ ВИДЖЕТ НАСТРОЙКИ ЖИДКОГО МЕТАЛЛА (METAL-FX) ================= */
.metal-tuner-panel {
  position: fixed;
  bottom: 84px;
  left: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  z-index: 1000;
  background: rgba(14, 16, 22, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: #E6E4DF;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metal-tuner-panel.dock-right {
  left: auto !important;
  right: 24px !important;
}

.metal-tuner-panel.open,
.metal-tuner-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.metal-tuner-btn {
  position: relative;
  bottom: auto;
  left: auto;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(20, 22, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(102, 178, 255, 0.45);
  border-radius: 999px;
  color: #E0F2FE;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.metal-tuner-btn:hover {
  background: rgba(30, 36, 48, 0.95);
  border-color: #38BDF8;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 189, 248, 0.4);
}

/* ================= 3D ROTATION (X, Y, Z) STYLES ================= */
.tuner-rotation-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tuner-axis-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.tuner-axis-badge.axis-x { background: rgba(245, 158, 11, 0.2); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.4); }
.tuner-axis-badge.axis-y { background: rgba(56, 189, 248, 0.2); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.4); }
.tuner-axis-badge.axis-z { background: rgba(167, 139, 250, 0.2); color: #A78BFA; border: 1px solid rgba(167, 139, 250, 0.4); }

.tuner-step-btn {
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94A3B8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  min-width: 28px;
  text-align: center;
  line-height: 1;
}
.tuner-step-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

.tuner-zero-btn {
  padding: 4px 7px;
  background: rgba(229, 197, 131, 0.12);
  border: 1px solid rgba(229, 197, 131, 0.3);
  border-radius: 6px;
  color: #E5C583;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 26px;
  text-align: center;
  line-height: 1;
}
.tuner-zero-btn:hover {
  background: #E5C583;
  color: #0E1016;
  border-color: #E5C583;
}

.tuner-link-btn {
  background: none;
  border: none;
  color: #E5C583;
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.tuner-link-btn:hover {
  color: #FFFFFF;
}

.tuner-rot-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.tuner-rot-preset-btn {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #CBD5E1;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tuner-rot-preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(229, 197, 131, 0.4);
  color: #FFFFFF;
}
.tuner-rot-preset-btn.active {
  background: rgba(229, 197, 131, 0.15);
  border-color: #E5C583;
  color: #E5C583;
}
.tuner-rot-preset-btn .preset-title {
  font-weight: 600;
  font-size: 11.5px;
}
.tuner-rot-preset-btn .preset-sub {
  font-size: 10px;
  color: #94A3B8;
  font-family: 'JetBrains Mono', monospace;
}


