/* 
 * UFO Department of War Mirror Portal - Master Design System
 * Colors, Typography, Glassmorphism, Micro-animations, and Responsive Views
 * OPTIMIZED FOR MOBILE FIRST - NATIVE APP FEEL
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Palette from Mockup */
  --color-plum: #811638;       /* Deep Plum/Burgundy */
  --color-teal: #0B7978;       /* Accent Cyan/Teal */
  --color-yellow: #FCB632;     /* Gold ratings/warnings */
  --color-orange: #F27238;     /* Affiliate / Call-To-Action */
  --color-crimson: #C32327;    /* Classified Red / Top Secret */
  
  /* RGB variables for alpha blending */
  --color-teal-rgb: 11, 121, 120;
  --color-plum-rgb: 129, 22, 56;
  --color-orange-rgb: 242, 114, 56;
  --color-crimson-rgb: 195, 35, 39;
  
  /* Interface themes */
  --bg-dark-1: #06090c;
  --bg-dark-2: #0f141a;
  --bg-glass: rgba(15, 20, 26, 0.85);
  --border-glass: rgba(11, 121, 120, 0.2);
  --border-glass-hover: rgba(11, 121, 120, 0.5);
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  
  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Layout constraints */
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--color-teal) var(--bg-dark-1);
}

body {
  background: radial-gradient(circle at 50% 0%, #151e28 0%, var(--bg-dark-1) 70%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* Leave room for mobile bottom navigation */
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-1);
}
::-webkit-scrollbar-thumb {
  background: var(--color-teal);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-orange);
}

/* Core Typography & Utility Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mono-text {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.w-full { width: 100% !important; }
.h-full { height: 100% !important; }

.classified-banner {
  background-color: var(--color-crimson);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: center;
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Premium Layout & Containers */
.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

header.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  color: var(--color-teal);
  text-shadow: 0 0 10px rgba(11, 121, 120, 0.5);
  box-shadow: 0 0 10px rgba(11, 121, 120, 0.2);
  transition: all var(--transition-speed);
}

.logo-container:hover .logo-icon {
  transform: rotate(180deg) scale(1.1);
  border-color: var(--color-orange);
  color: var(--color-orange);
  box-shadow: 0 0 15px rgba(242, 114, 56, 0.5);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.05em;
}

.logo-text span {
  color: var(--color-teal);
  font-weight: 400;
}

/* Desktop Navbar menu (hidden on mobile) */
.nav-links {
  display: flex;
  gap: 20px;
}

@media(max-width: 768px) {
  .nav-links {
    display: none; /* Hidden on mobile in favor of bottom navigation */
  }
  
  body {
    padding-bottom: 80px; /* More padding on mobile for larger bottom nav */
  }
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--transition-speed);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-teal);
  transition: width var(--transition-speed);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-teal);
}

.nav-link.active::after {
  width: 100%;
}

/* ==================== PREMIUM MOBILE BOTTOM NAVIGATION ==================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(11, 121, 120, 0.25);
  display: none; /* Desktop hidden */
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  padding: 0 10px;
}

@media(max-width: 768px) {
  .mobile-bottom-nav {
    display: flex; /* Visible on mobile */
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  gap: 4px;
  width: 20%;
  height: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.mobile-nav-item svg {
  stroke: var(--text-muted);
  transition: all 0.2s ease;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  color: var(--color-teal);
}

.mobile-nav-item:hover svg, .mobile-nav-item.active svg {
  stroke: var(--color-teal);
  filter: drop-shadow(0 0 6px rgba(11, 121, 120, 0.6));
  transform: translateY(-2px);
}

/* Glassmorphic Panel Styles */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 20px;
  transition: all var(--transition-speed);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 40px rgba(11, 121, 120, 0.15);
}

/* Primary buttons & CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-teal) 0%, #119997 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(11, 121, 120, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 121, 120, 0.6);
  background: linear-gradient(135deg, #119997 0%, var(--color-teal) 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-teal);
  color: #fff;
}

.btn-orange {
  background: linear-gradient(135deg, var(--color-orange) 0%, #db591e 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(242, 114, 56, 0.4);
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 114, 56, 0.6);
}

.btn-watch-now {
  background: linear-gradient(135deg, var(--color-orange) 0%, #db591e 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(242, 114, 56, 0.5);
  font-weight: 700;
  border: 1px solid rgba(242, 114, 56, 0.6);
  animation: pulse-orange 2s infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-watch-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(242, 114, 56, 0.8), 0 0 10px rgba(242, 114, 56, 0.4);
  background: linear-gradient(135deg, #db591e 0%, var(--color-orange) 100%);
}

@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 12px rgba(242, 114, 56, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(242, 114, 56, 0.8), 0 0 12px rgba(242, 114, 56, 0.5);
  }
}

.btn-icon {
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

/* Home Welcome view specific styles */
.hero-section {
  text-align: center;
  padding: 40px 0;
  position: relative;
}

.hero-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border: 1px dashed rgba(11, 121, 120, 0.15);
  border-radius: 50%;
  pointer-events: none;
  animation: spin 30s linear infinite;
  z-index: 0;
}

.hero-radar-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: #cbd5e1;
  border-radius: 50%;
  box-shadow: 0 0 10px #cbd5e1;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-subtitle {
  font-family: var(--font-mono);
  color: var(--color-teal);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span {
  background: linear-gradient(135deg, var(--color-crimson) 0%, #ec3c40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 24px auto;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  position: relative;
  z-index: 10;
}

@media(max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0 20px;
  }
}

/* Home Statistics & Release Badges */
.stats-container {
  display: grid;
  grid-template-cols: repeat(3, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

@media(max-width: 480px) {
  .stats-container {
    grid-template-cols: 1fr;
    gap: 10px;
  }
}

.stat-card {
  text-align: center;
  padding: 16px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--color-teal);
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 15px rgba(11, 121, 120, 0.4);
}

.stat-number.gold {
  color: var(--color-yellow);
  text-shadow: 0 0 15px rgba(252, 182, 50, 0.4);
}

.stat-number.orange {
  color: var(--color-orange);
  text-shadow: 0 0 15px rgba(242, 114, 56, 0.4);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Category Grid list on Home Page */
.category-heading {
  text-align: left;
  margin-bottom: 16px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--color-teal);
  padding-left: 10px;
}

.category-grid {
  display: grid;
  grid-template-cols: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

@media(max-width: 768px) {
  .category-grid {
    grid-template-cols: 1fr;
  }
}

.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.category-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(11, 121, 120, 0.1);
  border: 1px solid rgba(11, 121, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-teal);
  transition: all var(--transition-speed);
}

.category-card:hover .category-icon-box {
  background: var(--color-teal);
  color: #fff;
  box-shadow: 0 0 15px rgba(11, 121, 120, 0.6);
  transform: scale(1.05);
}

.category-info {
  flex: 1;
}

.category-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
  transition: color var(--transition-speed);
}

.category-card:hover .category-title {
  color: var(--color-teal);
}

.category-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.category-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-speed);
}

.category-card:hover .category-arrow {
  transform: translateX(4px);
  color: var(--color-teal);
}

/* Document & Media Browser View */
.view-container {
  display: none; /* Controlled via Javascript */
  animation: fadeIn var(--transition-speed) ease;
}

.view-container.active {
  display: block;
}

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

/* ==================== INTERACTIVE ARCHIVES BROWSER GRID ==================== */
.browser-layout {
  display: grid;
  grid-template-cols: 280px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

/* MOBILE FIRST: HIDE FILTER SIDEBAR IN AN EXPANDABLE DRAWER ON PORTABLE DEVICES */
@media(max-width: 992px) {
  .browser-layout {
    grid-template-cols: 1fr; /* Single column */
  }

  .filter-sidebar {
    position: fixed;
    bottom: -100%; /* Hidden offscreen at the bottom */
    left: 0;
    width: 100%;
    height: 80vh; /* Takes up 80% viewport height */
    z-index: 2000; /* Above bottom nav */
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .filter-sidebar.active {
    bottom: 0; /* Slides up smoothly */
  }

  .filter-sidebar .glass-panel {
    border-radius: 20px 20px 0 0;
    height: 100%;
    overflow-y: auto;
    border-top: 2px solid var(--color-teal);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.8);
    padding-bottom: 40px;
  }
}

/* Background overlay backdrop for the mobile filters drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
  animation: fadeIn var(--transition-speed);
}

.drawer-backdrop.active {
  display: block;
}

/* Sidebar filter systems */
.filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 16px;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-title {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: #fff;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition-speed);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(11, 121, 120, 0.1);
  border-color: rgba(11, 121, 120, 0.3);
  color: var(--color-teal);
  font-weight: 600;
}

.filter-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 10px;
}

.filter-btn.active .filter-badge {
  background: var(--color-teal);
  color: #fff;
}

/* Browser main search and results */
.browser-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-bar-container {
  display: flex;
  gap: 10px;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 12px 16px 12px 40px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-speed);
}

.search-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 15px rgba(11, 121, 120, 0.25);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Trigger button for Mobile Filters Drawer */
.btn-filter-trigger {
  display: none; /* Hidden on desktop */
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--color-teal);
  background: rgba(11, 121, 120, 0.08);
  color: var(--color-teal);
}

@media(max-width: 992px) {
  .btn-filter-trigger {
    display: inline-flex; /* Visible on mobile */
  }
}

/* Browser List Cards & Mobile grid scaling */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media(max-width: 480px) {
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .sort-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.results-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.sort-select {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==================== HIGHLY OPTIMIZED RESPONSIVE DOCUMENT CARD ==================== */
.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--border-radius);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-speed);
  position: relative;
  cursor: pointer;
}

.doc-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(11, 121, 120, 0.15);
}

.doc-badge-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.doc-card:hover .doc-badge-index {
  background: rgba(11, 121, 120, 0.1);
  border-color: rgba(11, 121, 120, 0.2);
  color: var(--color-teal);
}

.doc-card-main {
  flex: 1;
  min-width: 0; /* Essential for ellipsis/wrap inside flex items */
}

.doc-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap; /* Prevent Title squishing by wrapping type tags */
}

.doc-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: color var(--transition-speed);
  line-height: 1.3;
  word-break: break-word; /* Ensure extremely long IDs don't overflow */
}

.doc-card:hover .doc-card-title {
  color: var(--color-teal);
}

.doc-type-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.doc-type-badge.pdf { background: rgba(195, 35, 39, 0.15); color: var(--color-crimson); border: 1px solid rgba(195, 35, 39, 0.3); }
.doc-type-badge.vid { background: rgba(11, 121, 120, 0.15); color: var(--color-teal); border: 1px solid rgba(11, 121, 120, 0.3); }
.doc-type-badge.aud { background: rgba(252, 182, 50, 0.15); color: var(--color-yellow); border: 1px solid rgba(252, 182, 50, 0.3); }
.doc-type-badge.img { background: rgba(242, 114, 56, 0.15); color: var(--color-orange); border: 1px solid rgba(242, 114, 56, 0.3); }

/* MOBILE-FIRST GRID SYSTEM FOR METADATA INFO */
.doc-card-meta {
  display: grid;
  grid-template-cols: repeat(2, 1fr); /* 2 Columns on mobile */
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px dashed rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 8px;
}

@media(min-width: 768px) {
  .doc-card-meta {
    display: flex; /* Stretches to single flex-row on desktop */
    grid-template-cols: none;
    gap: 16px;
  }
}

.doc-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-download-btn {
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.doc-card:hover .doc-download-btn {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255,255,255,0.03);
}

.doc-download-btn:hover {
  color: var(--color-teal);
  border-color: var(--color-teal) !important;
  background: rgba(11, 121, 120, 0.1) !important;
  transform: scale(1.1);
}

/* Reading Room / Document Detail modal view */
.reading-room-layout {
  display: grid;
  grid-template-cols: 1fr 400px;
  gap: 24px;
  min-height: 500px;
  margin-bottom: 40px;
}

@media(max-width: 992px) {
  .reading-room-layout {
    grid-template-cols: 1fr;
  }
}

.reading-room-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.media-viewer-box {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
}

@media(max-width: 480px) {
  .media-viewer-box {
    height: auto;
  }
}

.media-placeholder-logo {
  text-align: center;
  z-index: 10;
  max-width: 90%;
  padding: 16px;
}

.media-placeholder-logo h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-teal);
  margin-top: 12px;
}

.media-placeholder-logo p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}

.media-viewer-box iframe, .media-viewer-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border: none;
  background: #000;
}

.viewer-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.viewer-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  transition: all var(--transition-speed);
}

.viewer-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.viewer-tab.active {
  color: var(--color-teal);
  background: rgba(11, 121, 120, 0.1);
}

.dossier-text-container {
  height: 360px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  padding: 16px;
  color: #d1d5db;
}

@media(max-width: 480px) {
  .dossier-text-container {
    height: 300px;
  }
}

.dossier-text-container h1, .dossier-text-container h2 {
  font-family: var(--font-mono);
  color: var(--color-teal);
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(11, 121, 120, 0.3);
  padding-bottom: 6px;
  font-size: 14px;
}

.reading-room-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.metadata-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metadata-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  font-size: 13px;
}

.metadata-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metadata-value {
  font-weight: 600;
  text-align: right;
  word-break: break-all; /* Prevent long locations from stretching layout */
}

.agent-summary-box {
  border-left: 3px solid var(--color-teal);
  padding-left: 12px;
}

.agent-summary-box p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
}

.key-topics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.key-topic-item {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.4;
}

.key-topic-item svg {
  color: var(--color-yellow);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Merch Store & Amazon Affiliate storefront */
.store-grid {
  display: grid;
  grid-template-cols: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media(max-width: 1200px) { .store-grid { grid-template-cols: repeat(3, 1fr); } }
@media(max-width: 992px) { .store-grid { grid-template-cols: repeat(2, 1fr); } }
@media(max-width: 576px) { .store-grid { grid-template-cols: 1fr; } }

.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.product-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  background: var(--color-orange);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.product-tag.affiliate {
  background: var(--color-teal);
}

.product-img-box {
  width: 100%;
  height: 180px;
  background: #0b0d10;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.03);
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.product-card:hover .product-img-box img {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
  line-height: 1.3;
}

.product-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex: 1;
  line-height: 1.4;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-yellow);
}

/* Agentic declassification news section */
.terminal-news-box {
  background: #020406;
  border: 1px solid var(--color-teal);
  box-shadow: 0 0 20px rgba(11, 121, 120, 0.15);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  color: var(--color-teal);
  min-height: 500px;
  margin-bottom: 40px;
  position: relative;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-teal);
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-size: 11px;
}

.terminal-controls {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(11, 121, 120, 0.3);
}

.terminal-dot.active {
  background: var(--color-teal);
  box-shadow: 0 0 8px var(--color-teal);
}

.terminal-dot.yellow { background: var(--color-yellow); box-shadow: 0 0 8px var(--color-yellow); }
.terminal-dot.crimson { background: var(--color-crimson); box-shadow: 0 0 8px var(--color-crimson); }

.terminal-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  max-height: 400px;
}

.news-item {
  border-left: 2px solid rgba(11, 121, 120, 0.3);
  padding-left: 12px;
  transition: all var(--transition-speed);
}

.news-item:hover {
  border-left-color: var(--color-orange);
}

.news-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.news-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.news-item:hover .news-item-title {
  color: var(--color-teal);
}

.news-item-content {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer Section */
footer.main-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding-bottom: 20px; /* Keep neat space */
}

@media(max-width: 768px) {
  footer.main-footer {
    padding-bottom: 90px; /* Double padding on mobile so bottom-nav doesn't block text */
  }
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  color: #fff;
  font-size: 16px;
  margin-bottom: 10px;
}

.footer-logo span {
  color: var(--color-teal);
}

.footer-desc {
  max-width: 500px;
  margin: 0 auto 16px auto;
  font-weight: 300;
  line-height: 1.5;
  padding: 0 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.footer-link:hover {
  color: var(--color-teal);
}

.copyright {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 0 10px;
}

/* Mobile Filter Drawer Elements */
.drawer-header {
  display: none;
}

#btn-apply-filters {
  display: none;
}

@media(max-width: 992px) {
  .drawer-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
  
  #btn-apply-filters {
    display: block !important;
    width: 100%;
    margin-top: 20px;
  }
}

/* ==================== 6. DECLASSIFIED WATCH ROOM STYLES ==================== */
.watch-room-layout {
  display: grid;
  grid-template-cols: 1fr 380px;
  gap: 24px;
  margin-bottom: 40px;
}

@media(max-width: 992px) {
  .watch-room-layout {
    grid-template-cols: 1fr;
  }
}

.watch-featured-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.featured-player-box {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(11, 121, 120, 0.1);
}

@media(max-width: 992px) {
  .featured-player-box {
    height: auto;
  }
}

@media(max-width: 480px) {
  .featured-player-box {
    height: auto;
  }
}

.featured-player-box iframe, .featured-player-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border: none;
  background: #000;
}

.watch-metadata-panel {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.metadata-grid-mini {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  padding-top: 12px;
}

@media(max-width: 768px) {
  .metadata-grid-mini {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.watch-playlist-area {
  display: flex;
  flex-direction: column;
}

.watch-playlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 600px;
  padding-right: 6px;
}

/* Custom Scrollbar for watch-playlist */
.watch-playlist::-webkit-scrollbar {
  width: 4px;
}

.watch-playlist::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

.watch-playlist::-webkit-scrollbar-thumb {
  background: rgba(11, 121, 120, 0.3);
  border-radius: 4px;
}

.watch-playlist::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal);
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.playlist-item:hover {
  border-color: var(--border-glass-hover);
  transform: translateX(3px);
  box-shadow: 0 4px 15px rgba(11, 121, 120, 0.1);
}

.playlist-item.active {
  border-left: 3px solid var(--color-teal);
  background: rgba(11, 121, 120, 0.06);
  border-color: rgba(11, 121, 120, 0.25);
}

.playlist-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: all var(--transition-speed);
}

.playlist-item:hover .playlist-icon-box {
  color: var(--color-teal);
  background: rgba(11, 121, 120, 0.08);
  border-color: rgba(11, 121, 120, 0.15);
}

.playlist-item.active .playlist-icon-box {
  color: #fff;
  background: var(--color-teal);
  border-color: var(--color-teal);
  box-shadow: 0 0 10px rgba(11, 121, 120, 0.5);
}

.playlist-info {
  flex: 1;
  min-width: 0;
}

.playlist-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item:hover .playlist-title {
  color: var(--color-teal);
}

.playlist-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  display: block;
}

/* ==================== INLINE DOSSIER PREVIEWS STYLES ==================== */
.media-image-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020305;
  padding: 10px;
}

.media-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.media-pdf-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020305;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.media-pdf-preview img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease;
}

.media-pdf-preview:hover img {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 15px 40px rgba(11, 121, 120, 0.3);
  border-color: rgba(11, 121, 120, 0.4);
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.media-pdf-preview:hover .preview-overlay {
  opacity: 1;
  pointer-events: auto;
}

.preview-overlay .btn {
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.media-pdf-preview:hover .preview-overlay .btn {
  transform: translateY(0);
}

/* ==================== DEFENSIVE RESPONSIVE MOBILE OVERRIDES ==================== */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.glass-panel {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.watch-room-layout, .reading-room-layout, .browser-layout {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.watch-featured-area, .watch-playlist-area, .reading-room-left, .reading-room-right, .browser-main {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.featured-player-box, .media-viewer-box {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

iframe, video, img {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==================== CUSTOM MULTI-POINT SHARING STYLES ==================== */
.doc-card-share-btn {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.doc-card:hover .doc-card-share-btn {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.doc-card-share-btn:hover {
  color: var(--color-teal) !important;
  border-color: var(--color-teal) !important;
  background: rgba(11, 121, 120, 0.1) !important;
  transform: scale(1.1);
}

.playlist-item-share-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0.5;
  transition: all var(--transition-speed);
}

.playlist-item:hover .playlist-item-share-btn {
  opacity: 0.8;
}

.playlist-item-share-btn:hover {
  color: var(--color-teal) !important;
  opacity: 1 !important;
  transform: scale(1.15);
}

.btn-share-page {
  transition: all var(--transition-speed);
}

.btn-share-page:hover {
  color: var(--color-teal) !important;
  border-color: var(--color-teal) !important;
  background: rgba(11, 121, 120, 0.1) !important;
}



