/* map-styles.css - Website Map Visual Styles */

/* ======== MAIN MAP CONTAINER ======== */
.interactive-map {
  width: 100%;
  height: 550px;
  background: linear-gradient(145deg, #060b18 0%, #0a1628 40%, #0d1f3c 100%);
  border-radius: 24px;
  border: 1px solid rgba(0, 255, 200, 0.12);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0, 255, 200, 0.03);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 200, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ======== CENTRAL HUB ======== */
.map-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  cursor: pointer;
  z-index: 10;
  user-select: none;
}

.hub-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(
    from 0deg,
    #00ffc8,
    #00aaff,
    #ff6b6b,
    #ffd700,
    #00ffc8
  ) border-box;
  -webkit-mask: 
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: hubRotate 6s linear infinite;
}

@keyframes hubRotate {
  to { transform: rotate(360deg); }
}

.hub-core {
  position: absolute;
  inset: 10px;
  background: linear-gradient(145deg, #0d1b2a, #1b2838);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 255, 200, 0.2);
  backdrop-filter: blur(10px);
}

.hub-icon {
  font-size: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.3));
}

.hub-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #00ffc8, #fff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.hub-subtitle {
  font-size: 9px;
  color: rgba(0, 255, 200, 0.6);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  margin-top: 2px;
}

.hub-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 200, 0.06), transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ======== WEBSITE NODES ======== */
.map-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-node {
  position: absolute;
  width: 200px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(13, 21, 38, 0.95), rgba(20, 35, 60, 0.9));
  border: 1px solid rgba(0, 255, 200, 0.2);
  border-radius: 16px;
  cursor: pointer;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.map-node:hover {
  transform: scale(1.05) !important;
  border-color: #00ffc8;
  box-shadow: 0 8px 40px rgba(0, 255, 200, 0.15), 0 0 0 2px rgba(0, 255, 200, 0.05);
  z-index: 20;
}

.map-node.selected {
  border-color: #4fc3f7;
  box-shadow: 0 8px 40px rgba(79, 195, 247, 0.2), 0 0 0 3px rgba(79, 195, 247, 0.1);
  z-index: 25;
}

.map-node.warning {
  border-color: #ffd700;
}

.map-node.warning:hover {
  box-shadow: 0 8px 40px rgba(255, 215, 0, 0.15);
}

.node-icon-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(0, 255, 200, 0.1), rgba(0, 170, 255, 0.05));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 255, 200, 0.15);
}

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

.node-name {
  font-size: 14px;
  font-weight: 600;
  color: #e0f0ff;
  margin-bottom: 2px;
  font-family: 'Hind Siliguri', sans-serif;
}

.node-url {
  font-size: 10px;
  color: rgba(0, 255, 200, 0.5);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.node-status-dot.active {
  background: #00ffc8;
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.5);
  animation: dotPulse 2s ease-in-out infinite;
}

.node-status-dot.warning {
  background: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.node-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: pulseRing 3s ease-out infinite;
  pointer-events: none;
}

.map-node:hover .node-pulse,
.map-node.selected .node-pulse {
  display: block;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0;
    border-color: #00ffc8;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ======== CONNECTION CANVAS ======== */
.map-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* ======== PARTICLES ======== */
.particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.map-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00ffc8;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 255, 200, 0.6);
  animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 0.5;
  }
  100% {
    transform: translate(50px, -50px) scale(1);
    opacity: 0;
  }
}

/* ======== DETAILS PANEL ======== */
.details-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 420px;
  max-width: 90vw;
  background: linear-gradient(135deg, rgba(8, 13, 26, 0.98), rgba(13, 21, 38, 0.95));
  border-left: 1px solid rgba(0, 255, 200, 0.15);
  backdrop-filter: blur(30px);
  box-shadow: -10px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  padding: 24px;
}

.details-panel.show {
  transform: translateX(0);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-icon {
  font-size: 32px;
}

.panel-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #e0f0ff;
  font-family: 'Hind Siliguri', sans-serif;
}

.detail-status {
  font-size: 12px;
  color: #00ffc8;
  font-family: 'JetBrains Mono', monospace;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: #4fc3f7;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-label {
  display: block;
  font-size: 10px;
  color: #7a9ab8;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.item-value {
  font-size: 18px;
  font-weight: 700;
  color: #00ffc8;
  font-family: 'JetBrains Mono', monospace;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-left: 3px solid #00ffc8;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 8px 8px 0;
}

.timeline-item.success {
  border-left-color: #00ffc8;
}

.timeline-item.warning {
  border-left-color: #ffd700;
}

.timeline-item.info {
  border-left-color: #4fc3f7;
}

.timeline-time {
  font-size: 10px;
  color: #7a9ab8;
  font-family: 'JetBrains Mono', monospace;
}

.timeline-text {
  font-size: 13px;
  color: #e0f0ff;
  font-family: 'Hind Siliguri', sans-serif;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  .interactive-map {
    height: 400px;
  }

  .map-hub {
    width: 120px;
    height: 120px;
  }

  .hub-icon {
    font-size: 24px;
  }

  .hub-title {
    font-size: 11px;
  }

  .map-node {
    width: 160px;
    padding: 10px 12px;
  }

  .node-icon-box {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .node-name {
    font-size: 12px;
  }

  .details-panel {
    width: 100%;
    max-width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
