:root {
  --bg-primary: #07070a;
  --bg-secondary: #0f1015;
  --bg-tertiary: #161722;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f2f5;
  --text-muted: #88909e;
  --neon-cyan: #00f0ff;
  --neon-green: #00ff88;
  --neon-red: #ff3366;
  --neon-yellow: #ffb800;
  --neon-purple: #b55fe6;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Syne', sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  min-height: 100vh;
}

.hud-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: radial-gradient(circle at 50% 10%, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
  z-index: 1;
}

/* TOP NAV */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.pulse-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  display: block;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.system-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-green {
  background: rgba(0, 255, 136, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-cyan {
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge-purple {
  background: rgba(181, 95, 230, 0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(181, 95, 230, 0.3);
}

/* CONTAINER */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 2;
}

/* METRICS */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.highlight-cyan { color: var(--neon-cyan); text-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
.highlight-green { color: var(--neon-green); text-shadow: 0 0 15px rgba(0, 255, 136, 0.3); }
.highlight-red { color: var(--neon-red); text-shadow: 0 0 15px rgba(255, 51, 102, 0.3); }
.highlight-yellow { color: var(--neon-yellow); text-shadow: 0 0 15px rgba(255, 184, 0, 0.3); }

.metric-foot {
  font-size: 11px;
  color: var(--text-muted);
}

/* WORKSPACE GRID */
.workspace-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

/* PANELS */
.panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-header {
  padding: 14px 18px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-link {
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 11px;
}
.panel-link:hover {
  text-decoration: underline;
}

.panel-body {
  padding: 16px;
}

/* CATALOG GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 18px;
  max-height: 800px;
  overflow-y: auto;
}

.catalog-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: var(--neon-cyan);
}

.card-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.catalog-card:hover .card-thumb {
  opacity: 1;
}

.duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-tag {
  font-size: 10px;
  color: var(--neon-purple);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-retention {
  font-size: 10px;
  color: var(--neon-green);
  font-weight: 600;
}

.btn-watch {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.btn-watch:hover {
  background: var(--neon-cyan);
  color: #000;
}

/* SYNDICATION */
.syndication-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 12px;
}

.syn-badge {
  align-self: flex-start;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
}

.syn-info h4 {
  font-size: 12px;
  color: #fff;
  margin-bottom: 4px;
}

.syn-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.btn-sm {
  display: inline-block;
  font-size: 10px;
  color: var(--neon-cyan);
  text-decoration: none;
}
.btn-sm:hover { text-decoration: underline; }

.tag {
  font-size: 10px;
  color: var(--neon-purple);
}

/* HIJACK */
.hijack-box {
  background: rgba(255, 51, 102, 0.04);
  border: 1px dashed rgba(255, 51, 102, 0.3);
  padding: 14px;
  border-radius: 6px;
}

.hijack-target {
  font-size: 11px;
  color: #fff;
  margin-bottom: 4px;
}

.hijack-link a {
  color: var(--neon-cyan);
  font-size: 11px;
  text-decoration: none;
}

.hijack-comment {
  margin: 10px 0;
  font-size: 11px;
  color: #bbb;
  border-left: 2px solid var(--neon-red);
  padding-left: 8px;
}

/* TERMINAL */
.terminal-body {
  background-color: #050508;
  padding: 14px;
  font-size: 11px;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-badge {
  font-size: 9px;
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.text-cyan { color: var(--neon-cyan); }
.text-green { color: var(--neon-green); }
.text-yellow { color: var(--neon-yellow); }
.text-purple { color: var(--neon-purple); }

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}
.close-btn:hover { color: #fff; }

.modal-title {
  font-size: 13px;
  color: #fff;
  margin-bottom: 14px;
  padding-right: 24px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}
