* {
  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: 18px 5vw;
  border-bottom: 1px solid #354052;
  background: #111722;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.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: 22px;
  margin: 0;
  letter-spacing: 0.02em;
  color: #fff;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usage-meter {
  font-size: 13px;
  background: #1b2434;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #3c4a63;
  color: #cad8ee;
}

.upgrade-btn {
  background: linear-gradient(135deg, #e7bb60, #d19e36);
  color: #191409;
  font-weight: 700;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

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

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.step-desc {
  font-size: 13px;
  color: #8da1bf;
}

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;
}

/* Pricing Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: #141c29;
  border: 1px solid #485873;
  border-radius: 16px;
  max-width: 980px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: #ffd885;
}

.close-btn {
  background: transparent;
  border: none;
  color: #cfd8e8;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
}

.modal-subtext {
  color: #9cb0cd;
  margin: 8px 0 24px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.price-card {
  background: #0d121b;
  border: 1px solid #354358;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.popular-card {
  border-color: #e7bb60;
  background: #111724;
}

.badge-featured {
  position: absolute;
  top: -12px;
  right: 14px;
  background: #e7bb60;
  color: #120e06;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.price-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.price-val {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.price-val span {
  font-size: 14px;
  color: #91a3be;
}

.price-card ul {
  padding-left: 20px;
  color: #aab8ce;
  font-size: 13px;
  margin: 16px 0 auto;
}

.price-card li {
  margin-bottom: 8px;
}

.plan-btn {
  width: 100%;
  margin: 16px 0 0;
  padding: 10px;
  border-radius: 6px;
}
