/* ============================================================
   components.css — Reusable UI components
   ============================================================ */

/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */
.btn {
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95em;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: #fff;
  color: #0a0a0a;
  font-weight: 500;
}

.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-accent);
}

.btn-generate {
  width: 100%;
  padding: 14px;
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: var(--space-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ----------------------------------------------------------------
   FILTER PILLS
   ---------------------------------------------------------------- */
.filter-pill {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85em;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill.active {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.filter-pill:hover:not(.active) {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   VIDEO CARD
   ---------------------------------------------------------------- */
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--border-medium);
}

.video-card .card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.video-card video,
.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card .card-info {
  padding: 16px;
}

.video-card .card-category {
  font-size: 0.7em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.video-card .card-title {
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.video-card .card-desc {
  font-size: 0.8em;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ----------------------------------------------------------------
   INPUTS
   ---------------------------------------------------------------- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.85em;
  color: var(--text-secondary);
  font-weight: 500;
}

.text-input,
.textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9em;
  transition: border-color var(--transition-fast);
}

.text-input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--border-strong);
}

.text-input::placeholder,
.textarea::placeholder {
  color: var(--text-dim);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.select-input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9em;
  transition: border-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.select-input:focus {
  outline: none;
  border-color: var(--border-strong);
}

/* ----------------------------------------------------------------
   UPLOAD ZONE
   ---------------------------------------------------------------- */
.upload-zone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--border-medium);
}

.upload-zone .upload-icon {
  font-size: 2em;
  margin-bottom: 8px;
  opacity: 0.5;
}

.upload-zone .upload-text {
  font-size: 0.85em;
}

.upload-zone .upload-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ----------------------------------------------------------------
   RANGE SLIDER
   ---------------------------------------------------------------- */
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

.range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

.range-value {
  font-size: 0.8em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
  text-align: right;
}

/* ----------------------------------------------------------------
   CHECKBOX / RADIO GROUPS
   ---------------------------------------------------------------- */
.checkbox-group,
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-group button,
.radio-group button {
  padding: 8px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85em;
  color: var(--text-secondary);
  background: transparent;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  user-select: none;
}

.checkbox-group button:hover,
.radio-group button:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.checkbox-group button.active,
.radio-group button.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: #fff;
}

/* ----------------------------------------------------------------
   STATUS / INFO
   ---------------------------------------------------------------- */
.status-text {
  font-size: 0.85em;
  color: var(--text-muted);
  padding: 8px 0;
}

.status-success {
  color: #4ade80;
}

.status-error {
  color: #f87171;
}

.status-loading {
  color: var(--text-secondary);
}

/* ----------------------------------------------------------------
   MODAL / OVERLAY
   ---------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevated);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5em;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   VIDEO PLAYER
   ---------------------------------------------------------------- */
.video-player {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-player video {
  width: 100%;
  display: block;
}
