* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop {
  width: 100%;
  max-width: 780px;
  padding: 32px 16px;
  transform: scale(2);
}

.main-window {
  width: 100%;
}

.window-body {
  display: flex;
  min-height: 420px;
}

/* ── Sidebar ── */

.sidebar {
  width: 180px;
  min-width: 180px;
  border-right: 2px solid #000;
  background: #fff;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid #000;
  user-select: none;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item.active {
  background: #000;
  color: #fff;
}

/* ── Content area ── */

.content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  overflow-y: auto;
}

/* ── Upload zone ── */

.upload {
  position: relative;
  border: 2px solid #000;
  background: #fff;
  min-height: 80px;
}

.upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
}

.upload-title {
  font-weight: bold;
}

.upload-hint {
  font-size: 11px;
}

/* ── YouTube input ── */

.youtube-input {
  border: 2px solid #000;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.youtube-input .field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.youtube-format {
  justify-content: flex-start;
  gap: 16px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #000;
  background: #ccc;
  color: #666;
}

.format-option.active {
  background: #000;
  color: #fff;
}

.format-option input {
  display: none;
}

/* ── Progress ── */

.progress-track {
  height: 16px;
  border: 2px solid #000;
  background: #fff;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(
    -45deg,
    #000,
    #000 4px,
    #fff 4px,
    #fff 8px
  );
  transition: width 0.2s ease;
}

/* ── Controls ── */

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status {
  font-size: 12px;
  margin-left: 4px;
}

/* ── Results ── */

.results-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border: 1px solid #000;
  font-size: 12px;
  gap: 8px;
}

.result-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.result-item button {
  flex-shrink: 0;
}

/* ── Responsive ── */

@media (max-width: 540px) {
  .window-body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  .sidebar-list {
    display: flex;
  }

  .sidebar-item {
    flex: 1;
    text-align: center;
    border-bottom: none;
    border-right: 1px solid #000;
  }

  .sidebar-item:last-child {
    border-right: none;
  }
}
