* { box-sizing: border-box; margin:0; padding:0; }

body {
  font-family: 'Arial', sans-serif;
  background: #f4f6f8;
  color: #222;
  padding: 20px;
}

.header { text-align: center; margin-bottom: 30px; }
.header h1 { font-size: 2em; margin-bottom: 5px; }
.header p { color: #555; font-size: 1em; }

.tabs-container { max-width: 800px; margin: 0 auto; }

.tab-input { display: none; }

.tabs { display: flex; justify-content: center; gap: 4px; margin-bottom: -1px; }
.tab-label {
  padding: 12px 24px;
  background: #ddd;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid #ccc;
  border-bottom: none;
  transition: 0.3s;
}
.tab-label:hover { background: #ccc; }

#tab-image:checked ~ .tabs label[for="tab-image"],
#tab-video:checked ~ .tabs label[for="tab-video"] {
  background: #4a85ff;
  color: white;
  border-color: #4a85ff;
}

.tab-content {
  display: none;
  border: 1px solid #ccc;
  border-radius: 0 6px 6px 6px;
  padding: 20px;
  background: #fff;
  margin-bottom: 20px;
}
#tab-image:checked ~ #content-image,
#tab-video:checked ~ #content-video {
  display: block;
}

.box { display:flex; flex-direction: column; gap: 16px; }

.drop {
  border: 2px dashed #999;
  border-radius: 8px;
  padding: 50px;
  text-align: center;
  color: #555;
  font-weight: bold;
  background: #fafafa;
  transition: 0.3s;
}
.drop:hover { background: #f0f0f0; border-color: #4a85ff; cursor: pointer; }

.settings { display:flex; gap: 20px; align-items: center; flex-wrap: wrap; }

select {
  padding: 10px;
  border-radius: 6px;
  border:1px solid #ccc;
  font-size: 14px;
}

button {
  padding: 12px 20px;
  background: #4a85ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
button:hover { background: #2f6dff; }

.file-list {
  list-style: none;
  margin-top: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
}

.file-list li img, .file-list li video {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-right: 12px;
  border-radius: 4px;
}

.file-list li button {
  padding: 6px 12px;
  background: #4a85ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
.file-list li button:hover { background: #2f6dff; }

@media (max-width: 600px) {
  .tabs { flex-direction: column; }
  .tab-label { width: 100%; text-align: center; }
  .file-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .file-list li button { align-self: stretch; }
  .file-list li img, .file-list li video { margin: 0; }
}

/* Force-visible helpers for JS-controlled panels when CSS overrides cause issues */
#convertedVideoContainer.visible {
  display: block !important;
}
#videoProgressContainer.visible {
  display: block !important;
}

#statusPanel {
  background: #fff5f5;
  border: 1px solid #ffcccc;
  color: #800;
  font-weight: bold;
}
