/* ==========================================================================
   P V R G E // WEIRD NEOCLASSICAL MINIMALIST DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg: #070709;
  --surface: #0f1014;
  --surface-hover: #15171d;
  --border-dim: #1a1c24;
  --border-chiseled: rgba(255, 255, 255, 0.09);
  
  --gold: #e5c158;
  --gold-glow: rgba(229, 193, 88, 0.25);
  --gold-dim: #a68936;
  --alabaster: #f4f1ea;
  
  --text-pure: #ffffff;
  --text-main: #e2e4e9;
  --text-muted: #8b92a2;
  --text-dim: #505666;
  
  --bad-red: #ef4444;
  --bad-red-bg: rgba(239, 68, 68, 0.12);
  --good-green: #10b981;
  --good-green-bg: rgba(16, 185, 129, 0.12);

  --font-classic: 'Cinzel', serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--gold);
  color: #000;
}

html, body {
  width: 100%;
  min-height: 100vh;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 48px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Neoclassical Spotlight Glow */
.neoclassical-glow {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 550px);
  height: min(90vw, 550px);
  background: radial-gradient(circle, rgba(229, 193, 88, 0.04) 0%, rgba(7, 7, 9, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Minimal Top Navigation */
.top-nav {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse-pip 2s infinite ease-in-out;
}

.status-label {
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: var(--surface);
}

/* Centered Canvas (Minimalist Flow) */
.canvas {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin: 0 auto;
}

/* Monolithic Neoclassical Header */
.monolith-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chiseled-glyph {
  color: var(--gold);
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}

.chiseled-glyph:hover {
  transform: translateY(-2px) scale(1.06);
}

.logo-title {
  font-family: var(--font-classic);
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--alabaster);
  text-indent: 0.16em; /* Optical centering for spaced text */
  text-shadow: 0 0 30px rgba(229, 193, 88, 0.12);
  transition: color 0.25s ease;
  user-select: none;
}

.logo-title:hover {
  color: var(--gold);
}

.latin-sub {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* Machine Zone */
.machine-zone {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Roman Numeral Mode Tabs */
.mode-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-chiseled);
  border-radius: 10px;
  padding: 5px;
}

.mode-pill {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-dim);
}

.roman-num {
  font-family: var(--font-classic);
  font-size: 14px;
  font-weight: 900;
  color: var(--text-dim);
}

.mode-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mode-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.mode-desc {
  font-size: 9.5px;
  color: var(--text-dim);
}

.mode-pill.active {
  background: #14161c;
  border-color: rgba(229, 193, 88, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.mode-pill.active .roman-num,
.mode-pill.active .mode-head {
  color: var(--gold);
}

/* Dropzone */
.dropzone {
  background: var(--surface);
  border: 1px dashed var(--border-chiseled);
  border-radius: 12px;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--gold);
  background: #12141a;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 30px rgba(229, 193, 88, 0.1);
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.drop-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-chiseled);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: #12141b;
  transition: transform 0.2s ease;
}

.dropzone:hover .drop-icon {
  transform: translateY(-2px) scale(1.08);
  border-color: var(--gold);
}

.drop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--alabaster);
  letter-spacing: 0.02em;
}

.drop-hint {
  font-size: 10.5px;
  color: var(--text-dim);
}

/* Progress Box */
.progress-box {
  background: var(--surface);
  border: 1px solid var(--border-chiseled);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: #151720;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  transition: width 0.2s ease;
}

.progress-status {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--gold);
}

/* Output Surface */
.output-surface {
  background: var(--surface);
  border: 1px solid var(--border-chiseled);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Verdict Card */
.verdict-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #090a0d;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 12px;
}

.verdict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
}

.verdict-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad-red);
  box-shadow: 0 0 8px var(--bad-red);
  flex-shrink: 0;
  margin-right: 8px;
}

.verdict-dot.good {
  background: var(--good-green);
  box-shadow: 0 0 8px var(--good-green);
}

.verdict-headline {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.verdict-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bad-red);
}

.verdict-label.good {
  color: var(--good-green);
}

.verdict-time {
  font-size: 10px;
  color: var(--text-dim);
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset:hover {
  color: var(--alabaster);
  border-color: rgba(255, 255, 255, 0.2);
}

/* The Honest Breakdown Audit Table */
.audit-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.audit-row.highlight {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.audit-prop {
  color: var(--text-muted);
}

.audit-status {
  font-weight: 700;
  color: var(--bad-red);
}

.audit-status.clean {
  color: var(--gold);
}

.audit-status.good {
  color: var(--good-green);
}

/* Actions Summary */
.actions-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-dim);
}

.actions-head {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.actions-list li {
  font-size: 10.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.actions-list li::before {
  content: '✓';
  color: var(--good-green);
  font-weight: 700;
}

/* Media Stage */
.media-stage {
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-chiseled);
}

.stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #111319;
  border-bottom: 1px solid var(--border-chiseled);
}

.stage-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-mono);
}

.stage-toggle {
  display: flex;
  background: #06070a;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 2px;
}

.stage-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-tab.active {
  background: var(--surface-hover);
  color: var(--alabaster);
  font-weight: 700;
}

.stage-display {
  width: 100%;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #040507;
}

.stage-display video {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.stage-display img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

/* Action Button */
.btn-action {
  background: var(--gold);
  color: #000;
  text-decoration: none;
  font-family: var(--font-classic);
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  padding: 13px 18px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 18px var(--gold-glow);
  min-height: 46px;
  width: 100%;
}

.btn-action:hover {
  background: #ebd076;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(229, 193, 88, 0.4);
}

.btn-action:active {
  transform: translateY(1px);
}

.btn-arrow {
  font-size: 16px;
  line-height: 1;
}

/* Batch Output */
.batch-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.batch-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #08090c;
  border: 1px solid var(--border-dim);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.batch-filename {
  color: var(--gold);
  font-weight: 700;
}

.batch-dl {
  color: var(--alabaster);
  text-decoration: none;
  font-weight: 700;
  font-size: 10.5px;
}

.batch-dl:hover {
  color: var(--gold);
}

/* Sub Hint */
.sub-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-dim);
  user-select: none;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 5, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-chiseled);
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-dim);
  background: #0a0b0e;
}

.modal-head h3 {
  font-family: var(--font-classic);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
}

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

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-section {
  background: #090a0d;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-section h4 {
  font-size: 11px;
  color: var(--gold);
  font-family: var(--font-classic);
  letter-spacing: 0.06em;
}

.modal-section p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-section code {
  color: var(--alabaster);
  background: #151720;
  padding: 1px 4px;
  border-radius: 3px;
}

.gold-note {
  color: var(--alabaster) !important;
  font-weight: 600;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #08090c;
  border: 1px solid var(--border-dim);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.history-card-name {
  color: var(--gold);
  font-weight: 700;
}

.dim-text {
  color: var(--text-dim);
  font-size: 11px;
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes pulse-pip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
