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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0d0f14;
  color: #dde1ec;
  min-height: 100vh;
  padding: 20px;
}

h1 { font-size: 1.6rem; color: #fff; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
header span { font-size: 2rem; }

.layout { display: flex; gap: 20px; flex-wrap: wrap; }
.col-left  { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.col-right { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }

/* Upload zone */
#drop-zone {
  border: 2px dashed #2d3450;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #12151f;
}
#drop-zone:hover, #drop-zone.over { border-color: #4f6ef7; background: #151929; }
#drop-zone .icon { font-size: 2.5rem; }
#drop-zone p { color: #6b7280; margin-top: 8px; font-size: 0.9rem; }
#drop-zone strong { color: #a0aec0; }

/* Video preview */
#video-preview { display: none; width: 100%; border-radius: 10px; background: #000; max-height: 280px; }
#video-info { font-size: 0.78rem; color: #6b7280; margin-top: 4px; text-align: center; }

/* Cards */
.card {
  background: #12151f;
  border: 1px solid #1e2336;
  border-radius: 12px;
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}
.card-header:hover { background: #161a28; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; }
.card-body { padding: 14px 16px; border-top: 1px solid #1e2336; display: none; }
.card-body.open { display: block; }
.toggle-arrow { color: #4b5563; transition: transform 0.2s; }
.toggle-arrow.open { transform: rotate(180deg); }

/* Toggle switch */
.toggle-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-sw {
  position: absolute; cursor: pointer; inset: 0;
  background: #2d3450; border-radius: 22px; transition: .3s;
}
.slider-sw:before {
  position: absolute; content: ""; height: 16px; width: 16px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s;
}
input:checked + .slider-sw { background: #4f6ef7; }
input:checked + .slider-sw:before { transform: translateX(18px); }

/* Form elements */
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.form-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 100px; }
label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }

input[type=text], input[type=number], select {
  background: #1a1e2e; border: 1px solid #2d3450; color: #dde1ec;
  padding: 7px 10px; border-radius: 7px; font-size: 0.88rem; width: 100%;
}
input[type=text]:focus, input[type=number]:focus, select:focus {
  outline: none; border-color: #4f6ef7;
}

input[type=range] { width: 100%; accent-color: #4f6ef7; }
input[type=color] {
  width: 38px; height: 30px; padding: 2px; border-radius: 6px;
  border: 1px solid #2d3450; background: #1a1e2e; cursor: pointer;
}

/* Music upload */
.upload-audio {
  display: flex; align-items: center; gap: 10px;
  background: #1a1e2e; border: 1px dashed #2d3450;
  border-radius: 8px; padding: 10px 14px; cursor: pointer;
  font-size: 0.85rem; color: #6b7280; transition: all 0.2s;
}
.upload-audio:hover { border-color: #4f6ef7; color: #a0aec0; }
#audio-name { font-size: 0.8rem; color: #4f6ef7; margin-top: 4px; }

/* Process button */
#btn-process {
  width: 100%; padding: 14px; background: #4f6ef7;
  border: none; border-radius: 10px; color: white;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.5px;
}
#btn-process:hover:not(:disabled) { background: #3b5ef0; transform: translateY(-1px); }
#btn-process:disabled { background: #2d3450; cursor: not-allowed; color: #6b7280; }

/* Progress */
#progress-wrap { display: none; }
.progress-bar-bg {
  background: #1a1e2e; border-radius: 20px; height: 10px; overflow: hidden; margin: 8px 0;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, #4f6ef7, #7c3aed);
  border-radius: 20px; transition: width 0.3s;
}
#progress-label { font-size: 0.82rem; color: #6b7280; text-align: center; }

/* Result */
#result-wrap { display: none; }
#btn-download {
  display: block; width: 100%; padding: 13px;
  background: #16a34a; border: none; border-radius: 10px;
  color: white; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; text-align: center; text-decoration: none;
  transition: background 0.2s;
}
#btn-download:hover { background: #15803d; }
#result-info { font-size: 0.8rem; color: #6b7280; text-align: center; margin-top: 6px; }
