@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg-color: #fcfcfc;
  --hud-blue: #2A4893;
  --hud-blue-light: #5B7DD2;
  --hud-blue-hover: #182a5c;
  --text-body: #1e2d50;
  --grid-color: rgba(42, 72, 147, 0.08);
  /* Body UI: high readability */
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Site logo / main title only */
  --font-title: 'Outfit', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  /* Blueprint Grid Background */
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  position: relative;
  overflow-x: hidden;
}

/* Global HUD Overlays */
.hud-corner {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--hud-blue);
  z-index: 100;
  pointer-events: none;
}
.hud-tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.hud-tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.hud-bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.hud-br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* HUD elements removed */

/* Layout */
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 80px 60px;
  position: relative;
  z-index: 10;
}

.main-title {
  position: absolute;
  top: 30px;
  left: 30px;
  font-family: var(--font-title);
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--hud-blue);
  z-index: 1000;
}

/* Panels */
.panel {
  border: 1px solid var(--hud-blue);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  padding: 20px;
  position: relative;
  overflow: visible;
}

.panel::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--bg-color);
  z-index: 0;
}

.panel-header {
  background: var(--hud-blue);
  color: var(--bg-color);
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: absolute;
  top: -12px;
  left: -1px;
  z-index: 10;
}

.panel-header-right {
  left: auto;
  right: -1px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--hud-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"], select, textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hud-blue);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 0;
  outline: none;
  transition: all 0.3s;
}

input[type="text"]:focus, select:focus, textarea:focus {
  border-bottom: 2px solid var(--hud-blue);
  background: rgba(42, 72, 147, 0.03);
}

input::placeholder {
  color: var(--hud-blue-light);
  opacity: 0.5;
}

.file-upload-wrapper {
  border: 1px dashed var(--hud-blue);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.file-upload-wrapper:hover {
  background: rgba(42, 72, 147, 0.05);
}

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

/* Buttons */
.hud-btn {
  background: transparent;
  border: 1px solid var(--hud-blue);
  color: var(--hud-blue);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hud-btn::before {
  content: '[';
}
.hud-btn::after {
  content: ']';
}

.hud-btn:hover {
  background: var(--hud-blue);
  color: var(--bg-color);
}

/* Dashboard Grid Layout */
.dashboard {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

/* Campaign page: three columns (asset | output | projections) */
.dashboard--three {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 28px;
  align-items: start;
}

.dashboard--three > .panel {
  min-width: 0;
}

.wireframe-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
  position: relative;
}

/* Simulated 3D wireframe animation using SVG/CSS */
.wireframe-svg {
  width: 100%;
  height: 100%;
  stroke: var(--hud-blue);
  stroke-width: 0.5;
  fill: none;
  animation: rotateWireframe 20s linear infinite;
  transform-origin: center;
}

@keyframes rotateWireframe {
  0% { transform: rotateY(0deg) rotateX(20deg); }
  100% { transform: rotateY(360deg) rotateX(20deg); }
}

.asset-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.asset-preview {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1;
  border: 1px solid var(--hud-blue);
  object-fit: contain;
  margin-bottom: 0;
  filter: grayscale(100%) contrast(1.2) sepia(100%) hue-rotate(180deg) saturate(3);
}

.asset-preview--thumb {
  width: 96px;
  max-width: none;
  height: 96px;
  flex: 0 0 auto;
  object-fit: cover;
}

.asset-preview--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
  color: var(--hud-blue);
  margin-bottom: 16px;
  min-height: 120px;
  padding: 12px;
}

/* Micro HUD Elements */
.tech-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  margin-top: 5px;
}
.tech-bar div {
  flex: 1;
  background: var(--hud-blue);
  opacity: 0.3;
}
.tech-bar div.active { opacity: 1; }

.script-block {
  margin-bottom: 30px;
  border-left: 2px solid var(--hud-blue);
  padding-left: 20px;
  position: relative;
}

.script-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--hud-blue);
  background: var(--bg-color);
}

.script-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text-body);
  line-height: 1.35;
}

.script-content {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text-body);
}

/* Multi-image upload on home */
.file-upload-zone {
  border: 1px dashed var(--hud-blue);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s;
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload-zone:hover,
.file-upload-zone.is-dragover {
  background: rgba(42, 72, 147, 0.06);
}

#preview-empty {
  cursor: pointer;
  outline: none;
}

#preview-empty:focus-visible {
  outline: 2px solid var(--hud-blue);
  outline-offset: 2px;
}

.file-upload-zone input[type="file"].file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.asset-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 0;
  margin-bottom: 8px;
}

.asset-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--hud-blue);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
}

.asset-thumb-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--hud-blue);
  background: var(--bg-color);
  color: var(--hud-blue);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  z-index: 2;
  transition: background 0.2s, color 0.2s;
}

.asset-thumb-remove:hover {
  background: var(--hud-blue);
  color: var(--bg-color);
}

.file-upload-hint {
  font-size: 12px;
  color: var(--hud-blue);
  opacity: 0.85;
  margin: 0;
  line-height: 1.45;
  max-width: 280px;
}

.file-upload-add-row {
  margin-top: 10px;
}

.btn-add-images {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px dashed var(--hud-blue);
  background: rgba(255, 255, 255, 0.9);
  color: var(--hud-blue);
  cursor: pointer;
  border-radius: 4px;
}

.btn-add-images:hover {
  background: rgba(42, 72, 147, 0.08);
}

.action-bar {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard--three {
    grid-template-columns: 1fr;
  }
}

