:root {
  --bg-core: #050507;
  --bg-card: #0e0e12;
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --accent-red: #ff0033;
  --accent-red-hover: #e6002e;
  --accent-red-glow: rgba(255, 0, 51, 0.35);
  --text-primary: #ffffff;
  --text-muted: #8e8e99;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *:before, *:after {
  box-sizing: border-box;
}

html {
  max-width: 100vw;
  overflow-x: hidden;
}

/* --- Content Submission Wizard Styles --- */
body {
  background-color: var(--bg-core);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  display: none; /* Controlled by submit.js auth guard */
}

.submit-page-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  box-sizing: border-box;
}

.submit-page-header {
  margin-bottom: 2rem;
}

.submit-page-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-top: 1rem;
}

.submit-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wizard-stage {
  display: none;
  width: 100%;
}

.wizard-stage.active {
  display: block;
}

.wizard-stage h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.stage-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 3.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-red);
  background: rgba(255, 0, 51, 0.04);
}

.drop-zone svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.drop-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.drop-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.drop-zone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-info-box {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 1.2rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.file-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.file-name { color: #fff; word-break: break-all; }
.file-size { color: var(--text-muted); white-space: nowrap; margin-left: 10px; }

/* Form Layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.input-readonly {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #777 !important;
  cursor: not-allowed;
}

/* Dynamic Trivia Cards */
.trivia-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-card-border);
  width: 100%;
}

.trivia-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trivia-section-header h3 {
  font-size: 1rem;
  font-weight: 800;
}

.btn-sm-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.trivia-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
  width: 100%;
}

.trivia-row input.fact-text { flex: 3; min-width: 0; }
.trivia-row input.fact-time { flex: 1; min-width: 0; }

.btn-remove-trivia {
  background: rgba(255, 0, 51, 0.15);
  border: 1px solid rgba(255, 0, 51, 0.3);
  color: var(--accent-red);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  flex-shrink: 0;
}

.stage-actions {
  display: flex;
  gap: 12px;
  margin-top: 2rem;
  width: 100%;
}

/* Review Stage */
.review-summary-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.2rem;
  width: 100%;
}

.review-item {
  font-size: 0.85rem;
  min-width: 0;
  word-break: break-word;
}

.review-item .lbl { color: var(--text-muted); display: block; font-size: 0.72rem; text-transform: uppercase; }
.review-item .val { font-weight: 700; color: #fff; }

.review-button-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* Legal Box */
.legal-scroll-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1.2rem;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 1.2rem;
  width: 100%;
}

.legal-scroll-box a { color: #635bff; text-decoration: underline; }

.legal-ack-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

.upload-progress-wrap {
  margin-bottom: 1.5rem;
  width: 100%;
}

.progress-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-red);
  transition: width 0.2s ease;
}

/* Completion Stage */
.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(76, 175, 80, 0.15);
  border: 2px solid #4caf50;
  color: #4caf50;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.text-center { text-align: center; }

.completion-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 2rem;
  width: 100%;
}

/* --- Required Field Asterisk & Validation Glow --- */
.req-asterisk {
  color: var(--accent-red);
  margin-left: 2px;
  font-weight: 800;
}

input.input-error {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.4) !important;
  background: rgba(255, 0, 51, 0.05) !important;
}

/* --- Artist Portal Navigation Button --- */
.btn-back-stream {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border, rgba(255, 255, 255, 0.15));
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  margin-bottom: 0.5rem;
}

.btn-back-stream:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-back-stream svg {
  stroke: #ffffff;
  display: block;
}

/* --- Responsive Breakpoints for Mobile Screens --- */
@media (max-width: 640px) {
  .submit-page-wrapper {
    padding: 1.25rem 0.75rem;
  }

  .submit-card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .form-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  .trivia-row {
    flex-direction: column;
    align-items: stretch;
  }

  .trivia-row input.fact-text,
  .trivia-row input.fact-time {
    width: 100%;
    flex: none;
  }

  .stage-actions,
  .review-button-group,
  .completion-actions {
    flex-direction: column;
  }

  .stage-actions button,
  .review-button-group button,
  .completion-actions button {
    width: 100%;
  }
}