body {
  background-color: #121212;
  color: #fff;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px;
  margin: 0;
}
h1 { margin-bottom: 15px; }
.controls {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  align-items: center;
}
.customizer-bar {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  align-items: center;
  background: #1e1e24;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.customizer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: bold;
}
select, input[type="range"], input[type="color"] {
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2b2b36;
  color: #fff;
  padding: 5px 8px;
  font-weight: bold;
}
input[type="color"] {
  padding: 0;
  width: 30px;
  height: 30px;
  border: none;
}
button, label.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:disabled {
  background-color: #444;
  cursor: not-allowed;
}
button:hover:not(:disabled), label.btn:hover {
  background-color: #0056b3;
}
label.btn-audio {
  background-color: #28a745;
}
label.btn-audio:hover {
  background-color: #218838;
}
#btnPreview {
  display: none;
  background-color: #17a2b8;
}
#btnPreview:hover {
  background-color: #138496;
}
#btnExport {
  display: none;
  background-color: #e0245e;
}
#btnExport:hover {
  background-color: #b01844;
}
input[type="file"] {
  display: none;
}
#status {
  margin-bottom: 12px;
  font-size: 14px;
  color: #aaa;
}
.canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
canvas {
  background-color: #0c0d10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
  border-radius: 8px;
  display: block;
  max-height: 480px;
  max-width: 90vw;
  width: auto;
  height: auto;
}
#assetSection {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 980px;
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: bold;
  color: #00d2ff;
}
.asset-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  min-height: 70px;
  align-items: center;
}
.asset-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid #555;
  overflow: visible;
  cursor: grab;
  flex-shrink: 0;
  background: #000;
}
.asset-item:hover {
  border-color: #00d2ff;
}
.asset-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  pointer-events: none;
}
.btn-delete-asset {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: #ff334b;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  line-height: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.btn-delete-asset:hover {
  background: #cc001b;
}
#timelineSection {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 980px;
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.timeline-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.timeline-title {
  font-size: 13px;
  font-weight: bold;
  color: #ffdd00;
}
.btn-clear-all {
  background: #3a1e28;
  border: 1px solid #722c42;
  color: #ff7b94;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.btn-clear-all:hover {
  background: #541d2f;
  color: #fff;
}
.timeline-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.timeline-block {
  flex: 0 0 170px;
  background: #252530;
  border: 2px dashed #444;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.timeline-block:hover {
  border-color: #00d2ff;
}
.timeline-block.active-playing {
  border-color: #ffdd00 !important;
  background: #2f2f3d !important;
}
.timeline-block.dragover {
  border-color: #00d2ff;
  background: #2d3142;
}
.timeline-block-img {
  position: relative;
  width: 100%;
  height: 80px;
  border-radius: 4px;
  background: #111;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}
.timeline-block-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.timeline-block-empty {
  font-size: 11px;
  color: #777;
  text-align: center;
  padding: 5px;
}
.btn-remove-block-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-remove-block-img:hover {
  background: #ff4d4d;
  color: #fff;
}
.timeline-block-time {
  font-size: 10px;
  color: #aaa;
  font-weight: bold;
}
.timeline-block-text {
  font-size: 12px;
  color: #fff;
  font-weight: bold;
  line-height: 1.2;
  height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.timeline-block-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid #333;
}
.btn-propagate {
  background: none;
  border: 1px solid #555;
  color: #aaa;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-propagate:hover {
  color: #fff;
  border-color: #00d2ff;
}
#downloadLink {
  margin-top: 15px;
  display: none;
  color: #00d2ff;
  font-size: 18px;
  text-decoration: none;
  font-weight: bold;
}
#downloadLink:hover {
  text-decoration: underline;
}
.select2-container--default .select2-selection--single {
  background-color: #2b2b36;
  border: 1px solid #444;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #fff;
  line-height: 38px;
  padding-left: 10px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
}
.select2-dropdown {
  background-color: #1e1e24;
  border: 1px solid #444;
  color: #fff;
  max-height: 320px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #007bff;
  color: #fff;
}
.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #333342;
}
.select2-results__option {
  padding: 8px 12px;
  border-bottom: 1px solid #292934;
}
.font-preview-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.font-preview-title {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
}
.font-preview-sample {
  font-size: 16px;
  color: #fff;
}

.btn-zoom-toggle {
  background: none;
  border: 1px solid #555;
  color: #777;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-zoom-toggle.active {
  border-color: #ff9800;
  color: #ff9800;
  background: rgba(255, 152, 0, 0.15);
}