* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0d1119;
  color: #eef1f7;
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

header {
  padding: 20px 5vw;
  border-bottom: 1px solid #354052;
  background: #111722;
}

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

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e7bb60;
}

h1 {
  font-size: 24px;
  margin: 0;
  letter-spacing: 0.02em;
  color: #fff;
}

small, .badge {
  color: #e7bb60;
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
}

section {
  padding: 24px;
  margin: 22px 0;
  background: #161e2b;
  border: 1px solid #354052;
  border-radius: 14px;
}

p {
  color: #bdc8dc;
  margin-top: 4px;
}

button, .download {
  background: #e7bb60;
  color: #191409;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  margin: 4px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease;
}

button.secondary {
  background: #273449;
  color: #eef1f7;
  border: 1px solid #3d4f6c;
}

button.danger {
  background: #8b2b2b;
  color: #fff;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.grid-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #cfd8e8;
}

input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  background: #0d1119;
  color: #eee;
  border: 1px solid #52617a;
  border-radius: 6px;
}

.smart-panel {
  border-color: #534524;
  background: #181d24;
}

.title-generator-box {
  background: #0d1119;
  border: 1px dashed #e7bb60;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.active-suggestion {
  font-size: 18px;
  font-weight: 700;
  color: #ffd885;
  margin-bottom: 12px;
}

.clip {
  padding: 16px;
  margin: 12px 0;
  background: #101622;
  border: 1px solid #2d3848;
  border-radius: 8px;
}

.clip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.clip-index {
  background: #273449;
  color: #ffd885;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.clip-title-input {
  flex-grow: 1;
  padding: 8px 12px;
  background: #0d1119;
  border: 1px solid #48566e;
  color: #fff;
}

.clip-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.clip video {
  width: 180px;
  max-height: 110px;
  background: #000;
  border-radius: 4px;
}

.clip-fields {
  display: flex;
  gap: 12px;
}

.clip-fields input {
  width: 110px;
}

.clip-actions {
  margin-top: 10px;
}

canvas {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #000;
  margin-top: 18px;
  border-radius: 6px;
}

progress {
  width: 100%;
  height: 12px;
  margin-top: 8px;
}

.status-container {
  margin: 16px 0;
}
