/* Beautiful Network Visualizer Styles */
.beautiful-network-visualizer {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  overflow: hidden;
}

/* Background Pattern */
.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Header Styles */
.visualizer-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.visualizer-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title-icon {
  font-size: 2.5rem;
  animation: pulse 2s ease-in-out infinite;
}

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

.header-stats {
  display: flex;
  gap: 2rem;
}

.stat-item {
  text-align: center;
  color: white;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Devices Grid */
.devices-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Beautiful Device Card */
.beautiful-device-card {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  overflow: hidden;
}

.beautiful-device-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border-radius: 24px;
  z-index: -1;
}

.beautiful-device-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Glowing Border Effect */
.glow-border {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, currentColor, transparent);
  border-radius: 26px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.beautiful-device-card:hover .glow-border {
  opacity: 0.6;
  animation: rotate-border 2s linear infinite;
}

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

/* Device Header */
.device-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.device-icon {
  font-size: 3rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.device-info {
  flex: 1;
}

.device-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.device-model {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 10px currentColor;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.status-badge {
  color: white !important;
  border: none;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Device Body */
.device-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.device-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.detail-item {
  text-align: center;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.detail-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}

/* Ports Section */
.ports-section {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 1rem;
}

.ports-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.5rem;
}

/* Beautiful Ports */
.beautiful-port {
  position: relative;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  overflow: hidden;
}

.beautiful-port::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  border-radius: 6px;
  z-index: 0;
}

.beautiful-port:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.beautiful-port.connected {
  animation: connected-pulse 2s ease-in-out infinite;
}

@keyframes connected-pulse {
  0%, 100% { box-shadow: 0 0 15px currentColor; }
  50% { box-shadow: 0 0 25px currentColor; }
}

.port-label {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.connection-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse-connection 1s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse-connection {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* Hover Overlay */
.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Connection Lines */
.connections-overlay {
  pointer-events: none;
}

.beautiful-connection-line {
  filter: url(#glow);
}

.connection-path {
  transition: all 0.3s ease;
  opacity: 0.8;
}

.beautiful-connection-line:hover .connection-path {
  opacity: 1;
  stroke-width: 5 !important;
}

.connection-endpoint {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.connection-endpoint.from {
  animation: endpoint-pulse 2s ease-in-out infinite;
}

.connection-endpoint.to {
  animation: endpoint-pulse 2s ease-in-out infinite 1s;
}

@keyframes endpoint-pulse {
  0%, 100% { r: 6; opacity: 1; }
  50% { r: 8; opacity: 0.7; }
}

.connection-label {
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.beautiful-connection-line:hover .connection-label {
  opacity: 1;
}

.data-flow {
  filter: drop-shadow(0 0 5px #ffffff);
}

/* Empty State */
.beautiful-empty-state {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.beautiful-empty-state h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.beautiful-empty-state p {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.add-device-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}

.add-device-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

/* Modal Styles */
.beautiful-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
}

.beautiful-modal-body {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
}

.beautiful-modal-footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.connection-alert {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  color: #1e40af;
}

.beautiful-select {
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.beautiful-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: rgba(255, 255, 255, 0.95);
}

.beautiful-color-picker {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.beautiful-color-picker:hover {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.create-connection-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}

.create-connection-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Device Type Specific Styles */
.beautiful-device-card.router {
  border-left: 4px solid #ef4444;
}

.beautiful-device-card.switch {
  border-left: 4px solid #3b82f6;
}

.beautiful-device-card.firewall {
  border-left: 4px solid #f59e0b;
}

.beautiful-device-card.server {
  border-left: 4px solid #10b981;
}

/* Responsive Design */
@media (max-width: 768px) {
  .beautiful-network-visualizer {
    padding: 1rem;
  }
  
  .visualizer-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-stats {
    gap: 1rem;
  }
  
  .devices-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .beautiful-device-card {
    padding: 1rem;
  }
  
  .device-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .device-details {
    grid-template-columns: 1fr;
  }
  
  .ports-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }
}

/* Dark mode support - DISABLED */
/*
@media (prefers-color-scheme: dark) {
  .beautiful-device-card {
    background: rgba(0, 0, 0, 0.8);
    color: white;
  }
  
  .device-name {
    color: white;
  }
  
  .detail-value {
    color: white;
  }
  
  .ports-title {
    color: white;
  }
}
*/

/* Force light mode - Override any dark mode styles */
@media (prefers-color-scheme: dark) {
  .beautiful-device-card {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
  }
  
  .device-name {
    color: #333 !important;
  }
  
  .detail-value {
    color: #666 !important;
  }
  
  .ports-title {
    color: #333 !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .beautiful-device-card {
    border: 3px solid;
  }
  
  .beautiful-port {
    border: 2px solid white;
  }
  
  .connection-path {
    stroke-width: 5 !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
} 