/* ===========================
   MatterVids Express UI
   Styled to match Validator
   Uses Validator CSS variables if available
   =========================== */

/* Theme variables with safe fallbacks.
   If your Validator defines these on :root, Express will match automatically. */
:root {
  --mvx-bg-1: var(--mv-bg-1, rgba(20, 22, 28, 0.95));
  --mvx-bg-2: var(--mv-bg-2, rgba(15, 17, 22, 0.95));
  --mvx-border: var(--mv-border, rgba(255, 255, 255, 0.08));

  --mvx-text: var(--mv-text, #e6e8ec);
  --mvx-text-dim: var(--mv-text-dim, #b6bcc6);
  --mvx-text-muted: var(--mv-text-muted, #9fa6b2);

  /* Brand accent - tries to inherit Validator's accent vars if present */
  --mvx-accent-1: var(--mv-accent-1, #ff4fa3);
  --mvx-accent-2: var(--mv-accent-2, #ff2f92);

  --mvx-input-bg: var(--mv-input-bg, rgba(255, 255, 255, 0.04));
  --mvx-input-border: var(--mv-input-border, rgba(255, 255, 255, 0.12));

  --mvx-radius: var(--mv-radius, 14px);
}

/* Container */
#mvx-app {
  max-width: 560px;
  margin: 24px 0;
  padding: 20px 22px;

  background: linear-gradient(180deg, var(--mvx-bg-1), var(--mvx-bg-2));
  border-radius: var(--mvx-radius);
  border: 1px solid var(--mvx-border);

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  color: var(--mvx-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
}

/* Title */
#mvx-app h3 {
  margin: 0 0 14px 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.2px;
  color: #ffffff;
}

/* Labels */
#mvx-app label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--mvx-text-dim);
}

/* Input */
#mvx-app input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;

  background: var(--mvx-input-bg);
  border: 1px solid var(--mvx-input-border);
  border-radius: 10px;

  color: #ffffff;
  font-size: 14px;

  outline: none;
}

#mvx-app input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#mvx-app input:focus {
  border-color: rgba(255, 105, 180, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.25);
}

/* Buttons */
#mvx-app button {
  appearance: none;
  border: none;
  border-radius: 999px;

  padding: 10px 18px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.3px;

  cursor: pointer;

  color: #ffffff;
  background: linear-gradient(135deg, var(--mvx-accent-1), var(--mvx-accent-2));

  box-shadow:
    0 8px 18px rgba(255, 47, 146, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    opacity 0.15s ease;
}

#mvx-app button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 26px rgba(255, 47, 146, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.05);
}

#mvx-app button:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(255, 47, 146, 0.35),
    inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* Disabled state (prevents double clicks) */
#mvx-app button.is-disabled,
#mvx-app button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  filter: none;
  box-shadow: none;
}

/* Status lines */
#mvx-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 550;
  color: #cfd4dc;
}

#mvx-progress {
  margin-top: 4px;
  font-size: 13px;
  color: var(--mvx-text-muted);
}

/* Helper text */
.mvx-helper {
  margin-top: 10px;
  font-size: 13px;
  color: var(--mvx-text-muted);
  line-height: 1.35;
}

/* Thin progress bar */
.mvx-progressbar {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.mvx-progressbar__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mvx-accent-1), var(--mvx-accent-2));
  transition: width 0.25s ease;
}

/* Download area */
#mvx-download {
  margin-top: 16px;
}
