:root {
  --bg-main: #080a0f;
  --bg-surface: #0e121a;
  --bg-panel: rgba(15, 20, 30, 0.88);
  --bg-card: rgba(24, 32, 48, 0.65);
  --bg-hover: rgba(38, 50, 75, 0.7);
  --bg-input: #0b0e15;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #00f0ff;
  --border-glow: rgba(0, 240, 255, 0.35);

  --accent-cyan: #00f0ff;
  --accent-pink: #ff007f;
  --accent-violet: #8a2be2;
  --accent-amber: #ffaa00;
  --accent-green: #00ff88;

  --text-main: #f0f4f8;
  --text-muted: #8e9bb0;
  --text-dim: #5c687e;

  --font-base: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.3);
  --shadow-pink: 0 0 20px rgba(255, 0, 127, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-base);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header */
.app-header {
  height: 64px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent-cyan);
  opacity: 0.85;
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quick-preset-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.quick-preset-picker label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-preset-picker select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.quick-preset-picker select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

/* Workspace */
.workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Stage Section */
.stage-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 50%, #101522 0%, #06080d 100%);
  position: relative;
  overflow: hidden;
}

.stage-toolbar {
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 22, 0.6);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.aspect-switchers {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.aspect-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.aspect-btn.active {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.stage-toggles {
  display: flex;
  gap: 10px;
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.toggle-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.toggle-chip input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Canvas Viewport */
.canvas-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.canvas-wrapper {
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, height 0.3s ease;
}

.canvas-wrapper.alpha-bg {
  background-image: 
    linear-gradient(45deg, #121620 25%, transparent 25%), 
    linear-gradient(-45deg, #121620 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #121620 75%), 
    linear-gradient(-45deg, transparent 75%, #121620 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
  background-color: #0b0e15;
}

.canvas-wrapper.aspect-16-9 {
  width: min(100%, calc((100vh - 200px) * 16 / 9));
  aspect-ratio: 16 / 9;
}

.canvas-wrapper.aspect-9-16 {
  height: calc(100vh - 200px);
  aspect-ratio: 9 / 16;
}

.canvas-wrapper.aspect-1-1 {
  height: calc(100vh - 200px);
  aspect-ratio: 1 / 1;
}

#vizCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Safe Zone Overlay */
.safe-zone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.safe-zone-box {
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(0, 240, 255, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.safe-zone-title {
  align-self: center;
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mock-right-buttons {
  position: absolute;
  right: 16px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.mock-disc {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 3s linear infinite;
}

.mock-bottom-bar {
  margin-top: auto;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  max-width: 75%;
}

.mock-channel {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mock-song {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Audio Player Bar */
.player-bar {
  height: 72px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  z-index: 10;
}

.player-main-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.player-btn-play:hover {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

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

.player-btn-sub {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-btn-sub:hover {
  color: var(--text-main);
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.player-btn-sub.active {
  color: var(--accent-cyan);
  border-color: var(--border-focus);
}

.time-display {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 90px;
}

.time-display span:first-child {
  color: var(--text-main);
}

.timeline-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 20px;
}

.timeline-slider {
  width: 100%;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.timeline-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  cursor: pointer;
  margin-top: -4px;
  transition: transform 0.1s ease;
}

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

.timeline-progress-bar {
  position: absolute;
  left: 0;
  top: 7px;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  border-radius: 3px;
  pointer-events: none;
  width: 0%;
}

.player-extra-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.volume-slider {
  width: 70px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-main);
  margin-top: -3px;
}

/* Sidebar Controls */
.controls-sidebar {
  width: 420px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-tabs-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  overflow: hidden;
}

.sidebar-tabs {
  display: flex;
  flex: 1;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.3) rgba(255, 255, 255, 0.05);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-tabs.is-dragging {
  cursor: grabbing;
}

.sidebar-tabs::-webkit-scrollbar {
  height: 4px;
  display: block;
}

.sidebar-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-tabs::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.25);
  border-radius: 2px;
}

.sidebar-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.tab-nav-arrow {
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.2s ease, color 0.2s ease;
  padding: 0;
}

.tab-nav-arrow.tab-nav-prev {
  left: 0;
  background: linear-gradient(to right, var(--bg-panel) 65%, transparent);
}

.tab-nav-arrow.tab-nav-next {
  right: 0;
  background: linear-gradient(to left, var(--bg-panel) 65%, transparent);
}

.tab-nav-arrow:hover {
  color: var(--accent-cyan);
}

.tab-nav-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.tab-btn {
  flex-shrink: 0;
  white-space: nowrap;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 13px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

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

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.04);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.active {
  display: flex;
}

/* Panel Sections & Forms */
.panel-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Switch Toggle (iOS / Modern Style) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

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

.switch-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  transition: all 0.25s ease;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.switch-toggle input:checked + .switch-slider {
  background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(18px);
  background-color: #000;
}

/* Shape Grid Picker */
.shape-grid-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.shape-card {
  cursor: pointer;
  user-select: none;
}

.shape-card input[type="radio"] {
  display: none;
}

.shape-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  gap: 4px;
}

.shape-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.shape-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.shape-card:hover .shape-card-inner {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-hover);
}

.shape-card input[type="radio"]:checked + .shape-card-inner {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.shape-card input[type="radio"]:checked + .shape-card-inner .shape-label {
  color: var(--accent-cyan);
}

/* Radio Pill Group */
.radio-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.radio-pill {
  flex: 1;
  min-width: 60px;
  cursor: pointer;
}

.radio-pill input[type="radio"] {
  display: none;
}

.radio-pill span {
  display: block;
  text-align: center;
  padding: 8px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.radio-pill input[type="radio"]:checked + span {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

/* Palette Quick Grid */
.palette-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.palette-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.palette-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--bg-hover);
}

.palette-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

/* Color Picker Row */
.color-picker-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 8px 4px;
  border-radius: var(--radius-md);
}

.color-picker-item label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Controls & Inputs */
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-row label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}

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

.toggle-row label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.range-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 60%;
}

.range-group input[type="range"] {
  flex: 1;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range-group input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.range-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  margin-top: -4px;
}

.range-value {
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 48px;
  text-align: right;
}

.color-picker-input {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-input::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.select-input, .form-group input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.select-input:focus, .form-group input[type="text"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus), var(--shadow-glow);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.03);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.dropzone-content svg {
  color: var(--accent-cyan);
}

.dropzone-text {
  font-size: 0.85rem;
  color: var(--text-main);
}

.dropzone-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.file-input-hidden {
  display: none !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
}

.file-badge {
  margin-top: 6px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
  color: #000;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 0.8rem;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.btn-glow {
  box-shadow: var(--shadow-glow);
}

/* Export Banner */
.export-banner {
  display: flex;
  gap: 12px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
}

.export-banner-icon {
  font-size: 1.2rem;
}

.export-banner code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* Export Engine Badge */
.export-engine-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.export-engine-badge.badge-server {
  background: rgba(255, 170, 0, 0.08);
  border-color: rgba(255, 170, 0, 0.3);
}

.export-engine-badge .badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.export-engine-badge .badge-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.export-engine-badge strong {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.export-engine-badge.badge-server strong {
  color: #ffaa00;
}

.export-engine-badge span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}

/* Export Progress */
.export-progress-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  border-radius: 4px;
  transition: width 0.1s linear;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preset-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.preset-select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 10px;
  color: var(--text-main);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 48px;
}

.preset-select-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  transform: translateY(-2px);
}

.preset-icon {
  font-size: 1.25rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.preset-btn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preset-btn-info strong {
  font-size: 0.82rem;
  color: var(--text-main);
}

.preset-btn-info small {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.preset-manager-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* AIWentNonsense Brand Elements & Mode */
.btn-aiwentnonsense {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(255, 0, 127, 0.18));
  border: 1px solid rgba(0, 240, 255, 0.6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(255, 0, 127, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-aiwentnonsense:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.35), rgba(255, 0, 127, 0.35));
  border-color: #00f0ff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.45), 0 0 35px rgba(255, 0, 127, 0.3);
  transform: translateY(-1px) scale(1.02);
  color: #ffffff;
}

.btn-aiwentnonsense:active {
  transform: translateY(1px) scale(0.99);
}

.preset-btn-highlight {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(128, 48, 224, 0.12));
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.preset-btn-highlight:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(255, 0, 127, 0.18));
  border-color: #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.preset-badge-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: linear-gradient(90deg, #00f0ff, #ff007f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide AWN presets if AWN mode is inactive */
body:not(.awn-mode-active) .preset-card-awn {
  display: none !important;
}

.btn-aiwentnonsense.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(255, 0, 127, 0.4));
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), inset 0 0 10px rgba(255, 0, 127, 0.3);
}

.ai-logo-load-btn {
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.06);
  color: #00f0ff;
  transition: all 0.2s ease;
}

.ai-logo-load-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
  color: #ffffff;
}

/* Utility classes */
.hidden {
  display: none !important;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* Export History */
.export-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
}
.export-history-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.export-history-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}
.export-history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.export-history-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.export-history-actions .btn {
  font-size: 0.75rem;
  padding: 4px 8px;
}

/* BPM Controls */
.bpm-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bpm-num-input {
  width: 72px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 6px 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}
.bpm-num-input:focus {
  outline: none;
  border-color: var(--border-focus);
}
.bpm-badge {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
