/* CSS Custom Properties for Theme Management */
:root {
  --primary-bg: #1a1a1a;
  --secondary-bg: #2d2d2d;
  --tertiary-bg: #3a3a3a;
  --accent-bg: #404040;
  --primary-text: #ffffff;
  --secondary-text: #b0b0b0;
  --muted-text: #808080;
  --border-color: #404040;
  --border-light: #555555;
  --primary-blue: #3498db;
  --success-green: #2ecc71;
  --warning-orange: #f39c12;
  --danger-red: #e74c3c;
  --accent-purple: #9b59b6;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 60px;
  --panel-width: 320px;
}

/* Light Theme Variables */
[data-theme="light"] {
  --primary-bg: #ffffff;
  --secondary-bg: #f8f9fa;
  --tertiary-bg: #e9ecef;
  --accent-bg: #dee2e6;
  --primary-text: #212529;
  --secondary-text: #495057;
  --muted-text: #6c757d;
  --border-color: #dee2e6;
  --border-light: #ced4da;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-bg);
  color: var(--primary-text);
  overflow: hidden;
  height: 100vh;
  transition: var(--transition);
  line-height: 1.6;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Header Styles */
.app-header {
  height: var(--header-height);
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: 0 2px 8px var(--shadow);
  position: relative;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo i {
  font-size: 1.5rem;
  color: var(--primary-blue);
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-text);
}

.header-controls {
  display: flex;
  gap: 0.5rem;
}

.header-btn {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: var(--accent-bg);
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.header-btn:active {
  transform: translateY(0);
}

/* Main Application Layout */
.app-container {
  display: flex;
  height: calc(100vh - var(--header-height));
  position: relative;
}

/* Control Panel Styles */
.control-panel {
  width: var(--panel-width);
  background: var(--secondary-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 2px 0 8px var(--shadow);
  position: relative;
  z-index: 10;
  animation: slideInFromLeft 0.5s ease-out;
}

.panel-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
  border-bottom: none;
}

.panel-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 1rem;
}

.panel-section h3 i {
  color: var(--primary-blue);
  font-size: 0.9rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Button Styles */
.control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--tertiary-bg);
  color: var(--primary-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  justify-content: flex-start;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: var(--border-light);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn.primary {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

.control-btn.primary:hover {
  background: #2980b9;
  border-color: #2980b9;
  animation: glow 2s infinite;
}

.control-btn.secondary {
  background: var(--accent-bg);
  border-color: var(--border-light);
}

.control-btn.success {
  background: var(--success-green);
  border-color: var(--success-green);
  color: white;
}

.control-btn.success:hover {
  background: #27ae60;
  border-color: #27ae60;
}

.control-btn.danger {
  background: var(--danger-red);
  border-color: var(--danger-red);
  color: white;
}

.control-btn.danger:hover {
  background: #c0392b;
  border-color: #c0392b;
}

/* Form Controls */
.control-select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--tertiary-bg);
  color: var(--primary-text);
  font-size: 0.9rem;
  transition: var(--transition);
}

.control-select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-slider {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-blue);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.control-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px var(--shadow);
}

.color-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker {
  width: 40px;
  height: 30px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

label {
  font-size: 0.85rem;
  color: var(--secondary-text);
  font-weight: 500;
}

#speed-value {
  font-size: 0.8rem;
  color: var(--muted-text);
  min-width: 30px;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-item {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
  transition: var(--transition);
  animation: bounceIn 0.6s ease-out;
  animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

.stat-item:hover {
  background: var(--accent-bg);
  border-color: var(--border-light);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--secondary-text);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue);
}

/* Visualization Area */
.visualization-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--primary-bg);
  animation: slideInFromRight 0.5s ease-out 0.2s both;
}

.viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 4px var(--shadow);
}

.viz-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.viz-title h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-text);
}

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

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-green);
  box-shadow: 0 0 10px var(--success-green);
  animation: pulse 2s infinite;
}

.status-indicator.processing {
  background: var(--warning-orange);
  box-shadow: 0 0 10px var(--warning-orange);
}

.status-indicator.error {
  background: var(--danger-red);
  box-shadow: 0 0 10px var(--danger-red);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-blue); }
  50% { box-shadow: 0 0 20px var(--primary-blue), 0 0 30px var(--primary-blue); }
}

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

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

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

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

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

#status-text {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.viz-controls {
  display: flex;
  gap: 0.5rem;
}

.viz-btn {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.viz-btn:hover {
  background: var(--accent-bg);
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* Cytoscape Container */
#cy {
  flex: 1;
  background: var(--primary-bg);
  position: relative;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  text-align: center;
  color: var(--primary-text);
}

.loading-spinner i {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.loading-spinner p {
  font-size: 1rem;
  color: var(--secondary-text);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
  display: flex;
}

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

.modal {
  background: var(--secondary-bg);
  border-radius: 12px;
  box-shadow: 0 20px 60px var(--shadow-heavy);
  min-width: 400px;
  max-width: 90vw;
  transform: translateY(-20px);
  animation: slideUp 0.3s ease-out;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-text);
}

.modal-header h3 i {
  color: var(--primary-blue);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted-text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--accent-bg);
  color: var(--primary-text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.input-group {
  margin-bottom: 1rem;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-text);
}

.input-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--tertiary-bg);
  color: var(--primary-text);
  font-size: 0.9rem;
  transition: var(--transition);
}

.input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-group input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  :root {
    --panel-width: 280px;
  }
}

@media (max-width: 968px) {
  :root {
    --panel-width: 260px;
  }

  .logo h1 {
    display: none;
  }

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

  .panel-section {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .control-panel {
    width: 100%;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-y: auto;
    flex-direction: row;
    overflow-x: auto;
  }

  .panel-section {
    min-width: 250px;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
  }

  .panel-section:last-child {
    border-right: none;
  }

  .visualization-area {
    height: calc(100vh - var(--header-height) - 200px);
  }

  .viz-header {
    padding: 0.75rem 1rem;
  }

  .viz-title h2 {
    font-size: 1rem;
  }

  .modal {
    min-width: 320px;
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .header-controls {
    gap: 0.25rem;
  }

  .header-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .control-panel {
    height: 160px;
  }

  .panel-section {
    min-width: 200px;
  }

  .viz-controls {
    flex-wrap: wrap;
  }

  .viz-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-indicator {
    animation: none;
  }
}

/* Focus Styles for Keyboard Navigation */
.control-btn:focus,
.header-btn:focus,
.viz-btn:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.control-select:focus,
.control-slider:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .control-panel,
  .viz-header,
  .app-header {
    display: none !important;
  }

  .visualization-area {
    height: 100vh !important;
  }

  #cy {
    height: 100vh !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #ffffff;
    --border-light: #ffffff;
    --shadow: rgba(255, 255, 255, 0.3);
    --shadow-heavy: rgba(255, 255, 255, 0.5);
  }

  .control-btn,
  .header-btn,
  .viz-btn {
    border-width: 2px;
  }
}

/* Button Ripple Effect */
.control-btn {
  position: relative;
  overflow: hidden;
}

.control-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.control-btn:active::before {
  width: 300px;
  height: 300px;
}

/* Loading states */
.control-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.control-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced hover effects */
.control-btn:hover {
  animation: float 2s ease-in-out infinite;
}

.stat-item:hover {
  transform: translateY(-2px);
  animation: glow 2s infinite;
}

/* Error animation */
.shake {
  animation: shake 0.5s ease-in-out;
}

/* Success pulse */
.success-pulse {
  animation: pulse 1s ease-in-out 3;
  border-color: var(--success-green) !important;
  box-shadow: 0 0 10px var(--success-green);
}

/* Network visualization enhancements */
.cytoscape-container {
  background: radial-gradient(circle at center, var(--accent-bg) 0%, var(--primary-bg) 100%);
}

/* Additional theme variations */
[data-theme="blue"] {
  --primary-bg: #0f1419;
  --secondary-bg: #1a2332;
  --tertiary-bg: #253241;
  --accent-bg: #2d3e50;
  --primary-blue: #3498db;
  --border-color: #34495e;
}

[data-theme="green"] {
  --primary-bg: #0d1b0d;
  --secondary-bg: #1a2e1a;
  --tertiary-bg: #2d4a2d;
  --accent-bg: #3e5c3e;
  --primary-blue: #27ae60;
  --border-color: #4a6741;
}

/* Tooltip styles */
.tooltip {
  position: absolute;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--primary-text);
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px var(--shadow);
}

/* Network analysis modal placeholder */
.analysis-modal {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Enhanced fullscreen styles */
.fullscreen-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: none;
}

.fullscreen-mode .fullscreen-controls {
  display: flex;
  gap: 0.5rem;
}

/* Connection animation */
@keyframes connectionPulse {
  0%, 100% { stroke-width: 3; opacity: 0.8; }
  50% { stroke-width: 6; opacity: 1; }
}

/* Data visualization enhancements */
.network-stats {
  font-family: 'Courier New', monospace;
  background: var(--tertiary-bg);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.metric-bar {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: var(--primary-blue);
  transition: width 0.5s ease;
}

/* Advanced animations for network elements */
.network-pulse {
  animation: pulse 2s infinite;
}

.network-highlight {
  filter: drop-shadow(0 0 8px var(--primary-blue));
}

.network-fade {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

/* Device Grid Styles */
.device-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.device-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--tertiary-bg);
  color: var(--primary-text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  min-height: 70px;
}

.device-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-blue);
  background: var(--accent-bg);
  box-shadow: 0 4px 12px var(--shadow);
}

.device-btn:active {
  transform: translateY(0);
  background: var(--primary-blue);
  color: white;
}

.device-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.device-btn i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.device-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

/* Device Type Specific Colors */
.device-btn[data-device="router"] {
  border-color: #3498db;
}

.device-btn[data-device="switch"] {
  border-color: #2ecc71;
}

.device-btn[data-device="computer"] {
  border-color: #9b59b6;
}

.device-btn[data-device="server"] {
  border-color: #e67e22;
}

.device-btn[data-device="firewall"] {
  border-color: #e74c3c;
}

.device-btn[data-device="cloud"] {
  border-color: #95a5a6;
}

.device-btn[data-device="router"]:hover {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

.device-btn[data-device="switch"]:hover {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
}

.device-btn[data-device="computer"]:hover {
  border-color: #9b59b6;
  background: rgba(155, 89, 182, 0.1);
}

.device-btn[data-device="server"]:hover {
  border-color: #e67e22;
  background: rgba(230, 126, 34, 0.1);
}

.device-btn[data-device="firewall"]:hover {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.device-btn[data-device="cloud"]:hover {
  border-color: #95a5a6;
  background: rgba(149, 165, 166, 0.1);
}

/* Tab System Styles */
.device-config-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--secondary-text);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.tab-btn.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
}

.tab-btn:hover {
  color: var(--primary-text);
  background: var(--accent-bg);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Interface and Routing Table Styles */
.interface-list,
.routing-table {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.interface-item,
.route-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--tertiary-bg);
}

.interface-item:last-child,
.route-item:last-child {
  border-bottom: none;
}

.interface-info,
.route-info {
  flex: 1;
}

.interface-name,
.route-destination {
  font-weight: 600;
  color: var(--primary-text);
  font-size: 0.9rem;
}

.interface-ip,
.route-gateway {
  font-size: 0.8rem;
  color: var(--secondary-text);
  margin-top: 0.25rem;
}

.interface-status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-up {
  background: var(--success-green);
  color: white;
}

.status-down {
  background: var(--danger-red);
  color: white;
}

.status-admin-down {
  background: var(--warning-orange);
  color: white;
}

/* IP Address Table Styles */
.ip-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.ip-table th,
.ip-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.ip-table th {
  background: var(--tertiary-bg);
  color: var(--primary-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.ip-table tr:hover {
  background: var(--accent-bg);
}

/* Protocol List Styles */
.protocol-list {
  max-height: 400px;
  overflow-y: auto;
}

.protocol-item {
  background: var(--tertiary-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.protocol-name {
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.protocol-details {
  font-size: 0.85rem;
  color: var(--secondary-text);
  line-height: 1.4;
}

/* Utility Classes */
.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

/* Device Status Indicators */
.device-status-online {
  border-color: var(--success-green) !important;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.device-status-offline {
  border-color: var(--danger-red) !important;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
  opacity: 0.7;
}

.device-status-warning {
  border-color: var(--warning-orange) !important;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

/* Connection Type Styles */
.connection-ethernet {
  line-color: #3498db;
  target-arrow-color: #3498db;
}

.connection-serial {
  line-color: #e67e22;
  target-arrow-color: #e67e22;
  line-style: dashed;
}

.connection-wireless {
  line-color: #9b59b6;
  target-arrow-color: #9b59b6;
  line-style: dotted;
}

/* Ping Animation */
.ping-animation {
  background-color: #f1c40f !important;
  transition: background-color 0.3s ease;
}

/* Packet Animation */
@keyframes packet-flow {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

.packet-animation {
  stroke-dasharray: 10;
  animation: packet-flow 2s linear infinite;
}