/* Media Monitor Dashboard - Cinematic Intelligence Center Styling */

:root {
  --primary-gradient: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
  --accent-color: #ff5252;
  --dark-bg: #121212;
  --card-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --light-text: rgba(255, 255, 255, 0.7);
  --border-radius: 10px;
  --glow-shadow: 0 0 15px rgba(38, 208, 206, 0.5);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --neon-blue: #4a90e2;
  --neon-green: #50e3c2;
  --neon-yellow: #f8e71c;
  --neon-red: #ff5252;
  --neon-orange: #ffb142;
  --danger-color: #ff5252;
  --warning-color: #ffb142;
  --success-color: #50e3c2;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-color);
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  position: relative;
  overflow-x: hidden;
}

.media-monitor-dashboard {
  min-height: 100vh;
  padding-bottom: 50px;
  position: relative;
}

/* Background effect */
.cyber-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: 
    radial-gradient(circle at 30% 30%, rgba(38, 208, 206, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(26, 41, 128, 0.05) 0%, transparent 40%);
  opacity: 0.8;
}

.dashboard-header {
  background: var(--primary-gradient);
  padding: 25px 0;
  margin-bottom: 30px;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: var(--glow-shadow);
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine 8s infinite linear;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }
  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

.dashboard-header h1 {
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  padding: 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  position: relative;
  display: inline-block;
}

.dashboard-header h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ffffff;
  animation: pulseWidth 3s infinite;
}

@keyframes pulseWidth {
  0%, 100% { width: 50%; left: 0; }
  50% { width: 100%; left: 0; }
}

.dashboard-header p {
  color: rgba(255, 255, 255, 0.9);
  margin: 15px 0 0;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* Live badge */
.live-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  background-color: rgba(255, 0, 0, 0.8);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  animation: pulseLive 2s infinite;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
}

.live-badge::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
  animation: blinkLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); }
  50% { box-shadow: 0 0 25px rgba(255, 0, 0, 0.8); }
  100% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); }
}

@keyframes blinkLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Stats Cards */
.stat-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px 20px;
  margin-bottom: 25px;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--primary-gradient);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(38, 208, 206, 0.3);
  font-family: 'Orbitron', 'Roboto Mono', monospace;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--light-text);
}

/* Feed cards */
.incident-card, .media-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 18px 15px;
  margin-bottom: 15px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.215, 0.610, 0.355, 1);
  border-left: 4px solid var(--neon-blue);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.media-card {
  border-left-color: var(--neon-green);
}

.incident-card:hover, .media-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.incident-card h5, .media-card h5 {
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  padding-left: 5px;
  border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.incident-card .badge, .media-card .badge {
  margin-right: 5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Priority styling */
.priority-high {
  border-left-color: var(--danger-color);
}

.priority-high::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(to left, rgba(255, 82, 82, 0.1), transparent);
  pointer-events: none;
}

.priority-medium {
  border-left-color: var(--warning-color);
}

.priority-low {
  border-left-color: var(--success-color);
}

/* Chart containers */
.chart-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--card-shadow);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
}

.dashboard-section {
  margin-bottom: 35px;
  position: relative;
}

.section-title {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
}

.section-title i {
  margin-right: 12px;
  font-size: 1.4em;
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-gradient);
}

/* Map container */
.map-container {
  height: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Feed item highlight animation for auto-scrolling */
.feed-item-highlight {
  animation: highlightPulse 1s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  z-index: 5;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 rgba(38, 208, 206, 0);
    transform: translateY(0);
  }
  20% {
    box-shadow: 0 0 20px rgba(38, 208, 206, 0.4);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 rgba(38, 208, 206, 0);
    transform: translateY(0);
  }
}

/* Enhanced scrollable feed styling for streaming look */
.scrollable-feed {
  position: relative;
  overflow-y: hidden; /* Hide default scrollbar */
  -ms-overflow-style: none; /* IE/Edge hide scrollbar */
  scrollbar-width: none; /* Firefox hide scrollbar */
  transition: all 0.3s ease;
  mask-image: linear-gradient(to bottom, 
    transparent 0%,
    rgba(0,0,0,1) 5%,
    rgba(0,0,0,1) 95%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    transparent 0%,
    rgba(0,0,0,1) 5%,
    rgba(0,0,0,1) 95%,
    transparent 100%
  );
}

.scrollable-feed::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.scrollable-feed:hover {
  overflow-y: auto; /* Show scrollbar on hover */
}

/* Add a subtle scan line effect to feeds */
.scrollable-feed::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(80, 227, 194, 0.2);
  box-shadow: 0 0 10px rgba(80, 227, 194, 0.4);
  opacity: 0.7;
  z-index: 10;
  animation: feedScanLine 3s linear infinite;
  pointer-events: none;
}

@keyframes feedScanLine {
  0% {
    top: 0;
    opacity: 0.2;
  }
  50% {
    top: 100%;
    opacity: 0.5;
  }
  100% {
    top: 0;
    opacity: 0.2;
  }
}

/* Stream status indicator for feeds */
.dashboard-section h4.section-title {
  position: relative;
}

.dashboard-section h4.section-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neon-green);
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  animation: streamPulse 2s infinite;
  box-shadow: 0 0 5px var(--neon-green);
}

@keyframes streamPulse {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(0.8);
  }
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.tag-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
}

.tag-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Emergency styling */
.emergency-stat {
  position: relative;
  animation: emergencyPulse 3s infinite;
}

@keyframes emergencyPulse {
  0% { color: white; text-shadow: 0 0 10px rgba(255, 82, 82, 0.5); }
  50% { color: var(--danger-color); text-shadow: 0 0 15px rgba(255, 82, 82, 0.8); }
  100% { color: white; text-shadow: 0 0 10px rgba(255, 82, 82, 0.5); }
}

/* Entrance animations */
.incident-entering {
  animation: slideInRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Counter animations */
.counter-anim {
  display: inline-block;
  animation: countUp 2s cubic-bezier(0.215, 0.610, 0.355, 1);
}

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

/* Meta information styling */
.incident-meta, .media-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.incident-meta i, .media-meta i {
  color: var(--neon-blue);
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .stat-value {
    font-size: 2.2rem;
  }
  
  .dashboard-header h1 {
    font-size: 1.8rem;
  }
  
  .live-badge {
    position: relative;
    right: 0;
    top: 0;
    margin-top: 15px;
    display: inline-flex;
    align-self: flex-start;
  }
  
  .map-container {
    height: 350px;
  }
  
  .scrollable-feed {
    max-height: 400px;
  }
}

/* Glassmorphism elements */
.glassmorphism {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ticker effect for live updates */
.ticker-container {
  background: rgba(26, 41, 128, 0.3);
  backdrop-filter: blur(5px);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  margin: 0 -15px 20px;
}

.ticker-wrapper {
  display: flex;
  animation: ticker 60s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  color: var(--text-color);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-item i {
  margin-right: 8px;
  color: var(--neon-green);
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Cyber terminal pulse effect for stats */
.cyber-pulse {
  position: relative;
  overflow: hidden;
}

.cyber-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(38, 208, 206, 0.2) 50%, 
    transparent 100%);
  opacity: 0;
  animation: cyberPulse 3s infinite;
  pointer-events: none;
}

@keyframes cyberPulse {
  0% {
    opacity: 0;
    height: 0%;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    height: 100%;
  }
}

/* Grid lines for cyber background */
.grid-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: 50px 50px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  pointer-events: none;
}

/* Navbar link style for Media Monitor */
.nav-item .nav-link.media-monitor-link {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nav-item .nav-link.media-monitor-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(38, 208, 206, 0.2);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-item .nav-link.media-monitor-link:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-item .nav-link.media-monitor-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--neon-green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px var(--neon-green);
}

.nav-item .nav-link.media-monitor-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-item .nav-link.media-monitor-link.active::after {
  transform: scaleX(1);
}

/* The connection of navbar to dashboard */
@keyframes connectionPulse {
  0%, 100% {
    opacity: 0.2;
    height: 0;
  }
  50% {
    opacity: 0.8;
    height: 20px;
  }
}

/* New section for interactive elements */
.status-alert {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  margin-right: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.status-alert.urgent {
  background-color: rgba(255, 82, 82, 0.2);
  color: var(--danger-color);
  border: 1px solid rgba(255, 82, 82, 0.3);
  animation: urgentPulse 2s infinite;
}

.status-alert.warning {
  background-color: rgba(255, 177, 66, 0.2);
  color: var(--warning-color);
  border: 1px solid rgba(255, 177, 66, 0.3);
}

.status-alert.success {
  background-color: rgba(80, 227, 194, 0.2);
  color: var(--success-color);
  border: 1px solid rgba(80, 227, 194, 0.3);
}

@keyframes urgentPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 82, 82, 0.4);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.8);
  }
}

/* Code scanner effect */
.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--neon-green);
  opacity: 0.7;
  box-shadow: 0 0 8px var(--neon-green);
  z-index: 10;
  animation: scannerAnimation 3s infinite;
}

@keyframes scannerAnimation {
  0% {
    top: 0;
    opacity: 0.5;
  }
  50% {
    top: 100%;
    opacity: 0.8;
  }
  100% {
    top: 0;
    opacity: 0.5;
  }
}

/* Data flow visualization */
.data-flow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.2;
}

.data-particle {
  position: absolute;
  width: 2px;
  height: 10px;
  background-color: var(--neon-blue);
  animation: dataFlow 8s linear infinite;
}

@keyframes dataFlow {
  0% {
    transform: translateY(-100px) translateX(var(--x-pos));
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 100px)) translateX(calc(var(--x-pos) + var(--x-delta)));
    opacity: 0;
  }
}

/* Font utilities */
.tech-font {
  font-family: 'Share Tech Mono', 'Roboto Mono', monospace;
  letter-spacing: 1px;
}

.display-font {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  letter-spacing: 2px;
}

/* Add map popup styling */
.map-cyber-popup {
  font-family: 'Rajdhani', sans-serif;
}

.map-cyber-popup .leaflet-popup-content-wrapper {
  background: rgba(30, 30, 30, 0.9);
  color: #e0e0e0;
  border-radius: 5px;
  border: 1px solid rgba(80, 227, 194, 0.3);
  box-shadow: 0 0 15px rgba(38, 208, 206, 0.3);
}

.map-cyber-popup .leaflet-popup-tip {
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(80, 227, 194, 0.3);
}

.map-popup h5 {
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 10px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.popup-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.popup-link {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(74, 144, 226, 0.2);
  color: var(--neon-blue) !important;
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 8px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
}

.popup-link:hover {
  background: rgba(74, 144, 226, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Active effects for cards */
.card-hovered {
  transform: translateY(-8px) scale(1.03) !important;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.5) !important;
  z-index: 10;
  border-left-width: 6px !important;
}

.card-clicked {
  transform: scale(0.98) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Stat value change animation */
.stat-changed {
  animation: statChanged 2s ease;
}

@keyframes statChanged {
  0% {
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(80, 227, 194, 0.8);
    letter-spacing: 1px;
  }
  100% {
    text-shadow: 0 0 10px rgba(80, 227, 194, 0.3);
    letter-spacing: normal;
  }
} 