*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary-color: #3f51b5;
  --bg-panel: rgba(20, 20, 25, 0.85);
  --bg-item: rgba(255, 255, 255, 0.05);
  --bg-item-hover: rgba(255, 255, 255, 0.1);
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-color: #00e5ff;
  --danger-color: #ff5252;
  --success-color: #69f0ae;
}

#ui-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  user-select: none;
  -webkit-user-select: none;
}

.ui-panel {
  position: absolute;
  top: 12px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.ui-panel-left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  width: 380px;
  border-radius: 0 16px 16px 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
  padding: 20px 16px;
  z-index: 10;
  display: none;
  flex-direction: column;
}

.ui-panel-left.visible {
  display: flex;
}

.ui-panel-left .animation-selector {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100% - 57px);
  overflow: hidden;
}

.ui-panel-left .ui-select.animation-list {
  flex: 1;
  max-height: none !important;
  min-height: 0;
  height: 100%;
}

.ui-panel-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  width: 380px;
  border-radius: 16px 0 0 16px;
  border-right: none;
  border-top: none;
  border-bottom: none;
  padding: 20px 16px;
  z-index: 10;
  display: none;
  flex-direction: column;
}

.ui-panel-right.visible {
  display: flex;
}

.ui-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-actions {
  display: flex;
  gap: 4px;
}

.btn-icon-sm {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon-sm:hover {
  background: var(--bg-item-hover);
  color: var(--text-main);
}

.ui-scroll-area {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.ui-scroll-area::-webkit-scrollbar {
  width: 4px;
}

.ui-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.ui-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.animation-selector {
  position: relative;
  width: 100%;
}

.ui-select {
  width: 100%;
  background: var(--bg-item);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0a0' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  transition: all 0.2s;
}

.ui-select:hover {
  background-color: var(--bg-item-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.ui-select.animation-list {
  appearance: revert;
  background-image: none;
  padding: 0;
  height: auto;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 8px;
}

.ui-select.animation-list::-webkit-scrollbar {
  width: 4px;
}

.ui-select.animation-list::-webkit-scrollbar-track {
  background: transparent;
}

.ui-select.animation-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.ui-select.animation-list option {
  padding: 8px 12px;
  border-radius: 4px;
  margin: 2px;
  cursor: pointer;
}

.ui-select.animation-list option:checked {
  background: var(--primary-color) !important;
  color: white;
}

.ui-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.ui-select option {
  background: #1a1a20;
  color: var(--text-main);
}

.ui-section {
  margin-bottom: 20px;
}

.ui-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.ui-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-item);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.ui-checkbox:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.ui-input {
  width: 100%;
  background: var(--bg-item);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.2s;
  user-select: text;
  -webkit-user-select: text;
}

.ui-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-item-hover);
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.ui-filter-input {
  margin-bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23a0a0a0' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  padding-left: 36px;
  flex: 1;
}

.filter-row {
  gap: 12px;
  margin-bottom: 14px;
}

.file-header-block {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #1e1e24;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-filter-row {
  margin-bottom: 0;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  border-top: 1px solid var(--border-color);
}

.file-filter-row .ui-filter-input {
  padding: 6px 10px 6px 28px;
  font-size: 11px;
  background-position: 8px center;
  background-size: 12px;
}

.file-tree-item {
  margin-bottom: 4px;
}

.file-row {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 8px;
  transition: all 0.2s;
}

.file-row:hover {
  background: var(--bg-item-hover);
}

.expand-toggle {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: transform 0.2s;
}

.expand-toggle.expanded {
  transform: rotate(90deg);
}

.file-name {
  flex: 1;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-danger:hover {
  background: var(--danger-color);
  color: white;
}

.parts-container {
  padding-left: 0;
  margin-top: 4px;
  display: none;
}

.parts-container.show {
  display: block;
}

.part-row {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  gap: 10px;
  font-size: 13px;
}

.visibility-toggle {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  background-color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.visibility-toggle.active {
  background-color: var(--accent-color);
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.visibility-toggle:hover {
  opacity: 0.8;
}

.part-name {
  flex: 1;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-name.active {
  color: var(--text-main);
}

.translation-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 8px 32px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 6px 6px;
  margin-top: -4px;
  margin-bottom: 4px;
}

.translation-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

.translation-input {
  width: 45px;
  background: var(--bg-item);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 10px;
  padding: 2px 4px;
  text-align: center;
  user-select: text;
  -webkit-user-select: text;
}

.translation-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

#notifications {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 11000;
  pointer-events: none;
}

.notification {
  pointer-events: auto;
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  border-left: 4px solid var(--primary-color);
  padding: 12px 16px;
  border-radius: 8px;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  border-left-color: var(--danger-color);
}

.notification.success {
  border-left-color: var(--success-color);
}

.notification.info {
  border-left-color: var(--accent-color);
}

.notification-content {
  font-size: 13px;
  color: #ffffff;
}

.notification-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding-left: 10px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.loading-card {
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px 40px;
  width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-family: 'Outfit', sans-serif;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-overlay.show .loading-card {
  transform: translateY(0) scale(1);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 229, 255, 0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spinner-rotate 1s linear infinite;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.loading-info {
  text-align: center;
  width: 100%;
}

.loading-status {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ffffff, #00e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loading-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  transition: none;
}

.part-expand-toggle {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 8px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.part-expand-toggle.expanded {
  transform: rotate(90deg);
  color: var(--accent-color);
}

.part-details-container {
  display: none;
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid var(--border-color);
  margin-left: 24px;
  margin-top: 2px;
  margin-bottom: 6px;
  border-radius: 0 0 6px 6px;
  padding: 6px 8px 8px 12px;
  flex-direction: column;
  gap: 8px;
}

.part-details-container.show {
  display: flex;
}

.part-details-header {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  margin-bottom: 2px;
}

.submeshes-list,
.blendshapes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.submesh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.submesh-eye-toggle {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  background-color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.2s ease;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.submesh-eye-toggle.active {
  background-color: var(--success-color);
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.submesh-eye-toggle:hover {
  opacity: 0.8;
}

.submesh-name {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  cursor: pointer;
}

.submesh-name.active {
  color: var(--text-main);
}

.blendshape-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.blendshape-row:last-child {
  border-bottom: none;
}

.blendshape-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.blendshape-label {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
}

.blendshape-value {
  color: var(--accent-color);
  font-family: monospace;
  font-weight: 600;
  width: 32px;
  text-align: right;
}

.blendshape-slider-container {
  display: flex;
  align-items: center;
  width: 100%;
}

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

.blendshape-slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.blendshape-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  transition: transform 0.1s;
}

.blendshape-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.animation-controls-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}

.animation-controls-row.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.inline-control {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.btn-playback {
  border-radius: 50%;
  background: var(--bg-item);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.btn-playback:hover {
  background: var(--bg-item-hover);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.btn-playback:active {
  transform: scale(0.95);
}

.btn-playback.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.icon-svg {
  width: 14px;
  height: 14px;
}

.seekbar-flex-container {
  flex: 2;
  display: flex;
  align-items: center;
}

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

.animation-seekbar-slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.animation-seekbar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  transition: transform 0.1s;
}

.animation-seekbar-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.speed-flex-container {
  flex: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.inline-speed {
  flex: 1;
}

.speed-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.speed-range-slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.speed-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.5);
  transition: transform 0.1s;
}

.speed-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.speed-slider-label-inline {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
}

.seekbar-label-counter-inline {
  font-family: monospace;
  font-weight: 600;
  color: var(--accent-color);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
  display: inline-block;
}

.custom-color-picker-wrapper {
  position: relative;
  width: 24px;
  height: 24px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.custom-color-picker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: none;
  z-index: 2;
}

.custom-color-icon {
  font-size: 15px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1;
}

#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #161720 0%, #08080c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  box-sizing: border-box;
  padding: 20px;
}

.splash-github-wrapper {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.splash-github-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.splash-github-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.splash-github-link:active {
  transform: translateY(0);
}

.splash-github-link svg {
  transition: transform 0.3s ease;
}

.splash-github-link:hover svg {
  transform: scale(1.05);
}

.splash-card {
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 40px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splash-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splash-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.splash-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(63, 81, 181, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
}

.splash-header {
  margin-bottom: 28px;
}

.splash-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.01em;
}

.upload-zone {
  width: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.upload-zone:hover {
  border-color: var(--accent-color);
  background: rgba(0, 229, 255, 0.04);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.05);
}

.upload-arrow {
  color: var(--accent-color);
  opacity: 0.8;
  transition: transform 0.3s;
}

.upload-zone:hover .upload-arrow {
  color: var(--accent-color);
  opacity: 1;
}

#text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

#text-file {
  color: var(--accent-color);
  font-weight: 600;
  border-bottom: 1.5px solid rgba(0, 229, 255, 0.3);
  padding-bottom: 1px;
  transition: all 0.2s;
  cursor: pointer;
}

#text-file:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.splash-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.divider-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 16px;
  letter-spacing: 0.1em;
}

#form {
  display: flex;
  width: 100%;
  gap: 8px;
}

.input-container {
  flex: 1;
  position: relative;
}

#input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  padding: 0 16px;
  outline: none;
  transition: all 0.3s;
}

#input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

#input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#button {
  height: 42px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

#button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.ui-btn {
  height: 38px;
  padding: 0 16px;
  background: var(--bg-item);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  outline: none;
}

.ui-btn:hover {
  background: var(--bg-item-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.ui-btn:active {
  transform: translateY(1px);
}

.ui-btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ui-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.ui-btn-primary:active {
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.droparea {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  place-items: center;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-color);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.droparea.active {
  display: grid;
  border: 3px dashed var(--accent-color);
  margin: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 16px;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.2), inset 0 0 30px rgba(0, 229, 255, 0.1);
  animation: pulse-drop 2s infinite alternate;
}

@keyframes pulse-drop {
  0% {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15), inset 0 0 20px rgba(0, 229, 255, 0.05);
  }

  100% {
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.3), inset 0 0 40px rgba(0, 229, 255, 0.15);
  }
}

@keyframes splash-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
  }
}

#splash.fade-out {
  animation: splash-fade-out 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}