:root {
  --bg-dark: #070709;
  --bg-card: #0c0c10;
  --bg-card-hover: #121218;
  --bg-border: #181824;
  --bg-border-highlight: #28283c;
  --text-main: #ededed;
  --text-muted: #6e6e80;
  --accent-cyan: #00f0ff;
  --accent-steel: #8e9ca8;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Syne', sans-serif;
  --deck-height: 76px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  padding-bottom: calc(var(--deck-height) + 30px);
}

/* Film Grain Texture */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==================== HEADER TELEMETRY ==================== */
.telemetry-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(7, 7, 9, 0.95);
  border-bottom: 1px solid var(--bg-border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 200;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.box-icon { color: var(--accent-cyan); font-size: 10px; }
.crosshair { color: var(--text-muted); }
.telemetry-tag { color: var(--text-muted); font-size: 10px; }

.brand-name {
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.16em;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid var(--bg-border);
}

.upload-session-btn {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
  border-color: var(--accent-cyan);
}

.upload-session-btn:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.new-release-btn {
  background: #111118;
  color: #fff;
}

.new-release-btn:hover {
  background: #181822;
  border-color: #38384e;
}

.cluster-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 10px;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ==================== PAGE LAYOUT ==================== */
.page-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Hero Monolith */
.hero-monolith {
  margin-top: 24px;
  border: 1px solid var(--bg-border);
  background: #040406;
  position: relative;
  overflow: hidden;
}

.hero-canvas-box {
  position: relative;
  height: 380px;
  width: 100%;
}

#nodeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#nodeCanvas:active { cursor: grabbing; }

.hero-overlay-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 24px;
  box-sizing: border-box;
}

.hud-tl, .hud-tr, .hud-bl, .hud-br {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hud-tr, .hud-br { text-align: right; }

.hud-center {
  text-align: center;
  margin: auto;
}

.monolith-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.15);
  margin-bottom: 6px;
}

.monolith-subtitle {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-muted);
}

/* ==================== VAULT NAV & TABS ==================== */
.vault-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 28px 0;
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-tabs {
  display: flex;
  gap: 10px;
}

.tab-trigger {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.tab-trigger .tab-num { color: var(--accent-cyan); }

.tab-trigger .badge {
  background: #181822;
  color: #a0a0b0;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
}

.tab-trigger:hover {
  border-color: #38384e;
  color: #fff;
}

.tab-trigger.active {
  background: #111118;
  border-color: var(--accent-cyan);
  color: #fff;
}

.tab-trigger.active .badge {
  background: var(--accent-cyan);
  color: #000;
}

.filter-wrapper {
  display: flex;
  align-items: center;
  background: #09090c;
  border: 1px solid var(--bg-border);
  padding: 6px 14px;
  width: 300px;
}

.search-ico { color: var(--text-muted); margin-right: 8px; }

.filter-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  width: 100%;
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-num {
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 14px;
}

.panel-header h2 {
  font-size: 14px;
  letter-spacing: 0.15em;
  color: #fff;
  text-transform: uppercase;
}

.h-line { flex-grow: 1; height: 1px; background: var(--bg-border); }
.panel-meta { font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; }

.vault-panel { display: none; }
.vault-panel.active { display: block; }

/* ==================== SESSIONS STREAM ==================== */
.sessions-stream {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.session-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  transition: border-color 0.2s ease;
}

.session-entry-card:hover {
  border-color: var(--bg-border-highlight);
}

.session-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #000;
  border: 1px solid var(--bg-border);
  overflow: hidden;
}

.session-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.session-entry-card:hover .session-poster-img {
  transform: scale(1.02);
}

.session-tag-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--bg-border);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.session-content-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.session-telemetry-tags {
  display: flex;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tag-cyan { color: var(--accent-cyan); font-weight: 700; }
.tag-gray { color: var(--text-muted); }

.session-headline {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}

.session-dj-credit {
  font-size: 13px;
  color: var(--accent-steel);
  font-weight: 600;
  margin-bottom: 14px;
}

.session-description-text {
  font-size: 12px;
  color: #9ea0b4;
  line-height: 1.6;
  margin-bottom: 20px;
}

.session-action-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.play-session-btn {
  background: var(--accent-cyan);
  color: #000;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 11px 22px;
  cursor: pointer;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.play-session-btn:hover {
  background: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

.download-session-btn {
  background: #111118;
  border: 1px solid var(--bg-border);
  color: var(--text-main);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s;
}

.download-session-btn:hover {
  border-color: #3f3f54;
  color: #fff;
}

/* Tracklist Table */
.session-cue-table {
  border: 1px solid var(--bg-border);
  background: #050508;
}

.cue-table-head {
  display: grid;
  grid-template-columns: 80px 1fr 60px 60px;
  padding: 8px 14px;
  background: #0d0d12;
  border-bottom: 1px solid var(--bg-border);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.cue-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px 60px;
  padding: 10px 14px;
  border-bottom: 1px solid #101016;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cue-row:hover { background: #12121a; }
.cue-row:last-child { border-bottom: none; }

.cue-timestamp { color: var(--accent-cyan); font-weight: 700; }
.cue-name { color: #d0d0e0; }
.cue-key, .cue-bpm { color: var(--text-muted); font-size: 11px; }

/* ==================== RELEASES GRID ==================== */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.release-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease;
}

.release-entry-card:hover {
  border-color: var(--bg-border-highlight);
}

.release-art-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  background: #000;
  border: 1px solid var(--bg-border);
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}

.release-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release-cat-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--bg-border);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.release-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.release-artists {
  font-size: 13px;
  color: var(--accent-steel);
  font-weight: 600;
  margin-bottom: 10px;
}

.release-specs-row {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.release-btn-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-preview-track {
  background: #111118;
  border: 1px solid var(--bg-border);
  color: var(--accent-cyan);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-preview-track:hover {
  background: var(--accent-cyan);
  color: #000;
}

.btn-buy-external {
  background: #09171e;
  border: 1px solid #143542;
  color: #fff;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
}

/* ==================== MANIFESTO LAYOUT ==================== */
.manifesto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.manifesto-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 28px;
}

.card-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.manifesto-card p {
  color: #a4a4b8;
  line-height: 1.7;
  margin-bottom: 20px;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-list li {
  padding-left: 18px;
  position: relative;
  color: #8c8c9e;
  line-height: 1.6;
}

.spec-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-cyan);
  font-size: 9px;
}

.spec-list strong { color: #fff; }

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-block label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.input-block input, .input-block textarea {
  width: 100%;
  background: #060608;
  border: 1px solid var(--bg-border);
  color: #fff;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  box-sizing: border-box;
}

.input-block input:focus, .input-block textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.hint-caption {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.submit-action-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}

.submit-action-btn:hover {
  background: var(--accent-cyan);
}

/* ==================== MODAL WINDOWS (PROPER ISOLATION) ==================== */
.vault-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(14px);
  padding: 24px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
}

.vault-modal.show {
  display: flex !important;
}

.modal-card {
  background: #0b0b0f;
  border: 1px solid #28283a;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: #0e0e14;
  border-bottom: 1px solid var(--bg-border);
}

.modal-headline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-x-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.modal-x-btn:hover { color: #fff; }

.modal-body-form {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* Custom File Dropzone (NO UGLY BROWSER BUTTONS!) */
.custom-file-drop {
  border: 1px dashed #2a2a3c;
  background: #060609;
  padding: 24px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}

.custom-file-drop:hover {
  border-color: var(--accent-cyan);
}

.custom-file-drop.compact {
  padding: 14px;
}

.custom-file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

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

.drop-arrow { font-size: 22px; color: var(--accent-cyan); }
.drop-status { font-size: 11px; font-weight: 700; color: #fff; }
.drop-subtext { font-size: 10px; color: var(--text-muted); }

.upload-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-rail {
  height: 8px;
  background: #111116;
  border: 1px solid var(--bg-border);
  overflow: hidden;
}

.progress-bar-indicator {
  height: 100%;
  width: 0%;
  background: var(--accent-cyan);
  transition: width 0.15s ease;
}

.progress-label {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 700;
}

.modal-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--bg-border);
  padding-top: 18px;
  margin-top: 8px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.btn-submit {
  background: var(--accent-cyan);
  color: #000;
  border: none;
  padding: 10px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover {
  background: #fff;
}

/* ==================== GLOBAL STICKY AUDIO DECK ==================== */
.sticky-audio-deck {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: var(--deck-height);
  background: rgba(8, 8, 12, 0.98);
  border-top: 1px solid #1f1f2e;
  backdrop-filter: blur(14px);
  z-index: 500;
  display: grid;
  grid-template-columns: 320px 1fr 200px;
  align-items: center;
  padding: 0 24px;
  box-sizing: border-box;
}

.deck-track-block {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.deck-artwork {
  width: 48px;
  height: 48px;
  background: #000;
  border: 1px solid var(--bg-border);
  overflow: hidden;
  flex-shrink: 0;
}

.deck-artwork img { width: 100%; height: 100%; object-fit: cover; }

.deck-info { overflow: hidden; }

.deck-track-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-track-meta {
  font-size: 10px;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.deck-playback-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.deck-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.deck-ctrl-btn {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.deck-ctrl-btn svg { width: 13px; height: 13px; }

.deck-ctrl-btn:hover { border-color: var(--accent-cyan); color: #fff; }

.play-hero-btn {
  width: 36px;
  height: 36px;
  background: #14141e;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.play-hero-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

.deck-timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.deck-seek-rail {
  flex-grow: 1;
  height: 10px;
  background: #101016;
  border: 1px solid #1c1c28;
  position: relative;
  cursor: pointer;
}

.deck-seek-fill {
  height: 100%;
  width: 0%;
  background: rgba(0, 240, 255, 0.4);
  border-right: 2px solid var(--accent-cyan);
  pointer-events: none;
}

.deck-cues-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cue-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  opacity: 0.65;
}

.deck-volume-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.vol-tag { font-size: 10px; color: var(--text-muted); }

.deck-vol {
  width: 80px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ==================== FOOTER ==================== */
.telemetry-footer {
  border-top: 1px solid var(--bg-border);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  background: #040406;
}

.footer-col-left, .footer-col-right { display: flex; align-items: center; gap: 12px; }
.scale-ticks { letter-spacing: -2px; color: #20202e; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .session-entry-card { grid-template-columns: 1fr; }
  .sticky-audio-deck { grid-template-columns: 1fr 1fr; height: auto; padding: 12px; gap: 10px; }
  .deck-volume-block { display: none; }
  .monolith-title { font-size: 38px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
