﻿/* 全局微调与滚动条 */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #222f46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334464;
}

/* 错误输入框高亮与轻微抖动动画 */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
  animation: shake 0.25s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Range 滑块美化 */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #1e293b;
  border-radius: 9999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  border: 2px solid #ffffff;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* 去除 number 输入框的上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Toggle 开关 */
.toggle-checkbox:checked {
  right: 0;
  border-color: #10b981;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #10b981;
}

/* 武器颜色圆标 */
.weapon-color-badge {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px currentColor;
}

/* 原生 Select 样式重置与深色美化 */
select.custom-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.6rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2rem;
}

/* 调色盘色球 */
.color-ball {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.color-ball:hover {
  transform: scale(1.2);
}
.color-ball.active {
  transform: scale(1.25);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px currentColor;
}

/* 职业模板卡片激活态 */
.template-label.active-warrior {
  border-color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.15) !important;
}
.template-label.active-summoner {
  border-color: #8b5cf6 !important;
  background-color: rgba(139, 92, 246, 0.15) !important;
}
