/* Custom Styles for Hacking Activity Platform */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Severity indicators */
.severity-critical {
  background-color: #ef4444;
}

.severity-high {
  background-color: #f97316;
}

.severity-medium {
  background-color: #eab308;
}

.severity-low {
  background-color: #22c55e;
}

/* Entity badges */
.entity-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.entity-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.entity-apt {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.entity-malware {
  background-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.entity-cve {
  background-color: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.entity-ioc {
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Timeline card animations */
.timeline-card {
  animation: slideInUp 0.4s ease-out;
}

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

/* Panel animations */
.panel {
  animation: slideInRight 0.3s ease-out;
  pointer-events: all;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
}

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

.panel-closing {
  animation: slideOutRight 0.3s ease-out;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

/* MITRE ATT&CK badge */
.mitre-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
  margin: 0.125rem;
}

/* Threat card hover effect */
.threat-card {
  transition: all 0.3s ease;
}

.threat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Source link styling */
.source-link {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.source-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Loading spinner */
.spinner {
  border: 3px solid #1e293b;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Stats card */
.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Panel section headers */
.panel-section-header {
  border-bottom: 2px solid #334155;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Activity timeline in panels */
.activity-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1rem;
}

.activity-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #334155;
}

.activity-item::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}

.activity-item:last-child::before {
  display: none;
}

/* Responsive panel width */
@media (max-width: 768px) {
  .panel {
    width: 100% !important;
    transform: translateX(0) !important;
  }
}

/* IoC display */
.ioc-value {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background-color: #1e293b;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #334155;
  word-break: break-all;
}

/* Confidence level indicators */
.confidence-high {
  color: #22c55e;
}

.confidence-medium {
  color: #eab308;
}

.confidence-low {
  color: #f97316;
}

/* Bookmark button */
.bookmark-btn {
  transition: all 0.2s;
}

.bookmark-btn:hover {
  color: #fbbf24;
}

.bookmark-btn.active {
  color: #fbbf24;
}

/* Share button */
.share-btn {
  transition: all 0.2s;
}

.share-btn:hover {
  color: #60a5fa;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* Panel overlay fade */
.panel-overlay-visible {
  display: block !important;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* CVSS Score Badge */
.cvss-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.cvss-critical {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.cvss-high {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.cvss-medium {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: white;
}

.cvss-low {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

/* Fade in animation for stats */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Pulse animation for real-time updates */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
