.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-content {
  background: var(--surface-color);
  border-radius: 24px;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

@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: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--surface-color);
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.btn-close {
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background: var(--bg-color);
  border-color: var(--border-color);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.detail-section {
  margin-bottom: 14px;
  background: var(--surface-color);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.detail-section:hover {
  background: var(--surface-hover);
  border-color: var(--border-color);
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #86efac 0%, #a7f3d0 100%);
  border-radius: 2px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.cpu-section-content .detail-grid,
.memory-section-content .detail-grid {
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-hover);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-item:hover {
  background: var(--bg-color);
  border-color: var(--border-color);
}

.item-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.item-value {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 700;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  letter-spacing: -0.2px;
}

.item-value.highlight {
  background: linear-gradient(135deg, #86efac 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 20px;
}

/* System Info Styles */
.system-info-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.system-info-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-group-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.system-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.system-info-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.system-info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #86efac 0%, #a7f3d0 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.system-info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(134, 239, 172, 0.3);
  background: #ffffff;
}

.system-info-item:hover::before {
  opacity: 1;
}

.system-info-item-full {
  grid-column: 1 / -1;
}

.system-info-item-highlight {
  background: #ffffff;
  border-color: rgba(134, 239, 172, 0.2);
}

.system-info-item-highlight:hover {
  background: #ffffff;
  border-color: rgba(134, 239, 172, 0.4);
}

.system-info-item-temperature {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.05) 0%, rgba(253, 224, 71, 0.05) 100%);
  border-color: rgba(248, 113, 113, 0.2);
}

.system-info-item-temperature:hover {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1) 0%, rgba(253, 224, 71, 0.1) 100%);
  border-color: rgba(248, 113, 113, 0.4);
}

.system-info-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.system-info-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.system-info-value {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 700;
  word-break: break-word;
  line-height: 1.3;
}

.system-info-value.highlight {
  background: linear-gradient(135deg, #86efac 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 16px;
}

.system-info-value-long {
  font-size: 12px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-secondary);
}

.system-info-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.temperature-value {
  color: #f87171;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .system-info-grid {
    grid-template-columns: 1fr;
  }
  
  .system-info-item-full {
    grid-column: 1;
  }
}

/* GPU Items */
.gpu-item {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.gpu-item:last-child {
  margin-bottom: 0;
}

.gpu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.gpu-header strong {
  color: var(--text-main);
  font-size: 1rem;
}

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

.gpu-status.ok {
  background: rgba(134, 239, 172, 0.1);
  color: var(--success-color);
}

.gpu-status.error {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger-color);
}

.gpu-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gpu-bar-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 60px;
}

.gpu-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-color);
  border-radius: 4px;
  overflow: hidden;
}

.gpu-bar {
  height: 100%;
  background: linear-gradient(90deg, #a7f3d0, #d1fae5);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.gpu-bar-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  min-width: 50px;
  text-align: right;
}

/* Core Usage Circular */
.per-core-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.per-core-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

.core-grid-circular {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(160px, 17%), 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.core-item-circular {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* CPU & Memory Section Circular */
.cpu-section-content,
.memory-section-content {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--surface-hover);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.cpu-circular-group {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.cpu-circular,
.cpu-load-circular,
.memory-circular {
  flex-shrink: 0;
}

/* Storage Circular */
.storage-grid-circular {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.storage-item-circular {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-hover);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.storage-details-mini {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .cpu-section-content,
  .memory-section-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cpu-circular-group {
    flex-direction: column;
    align-items: center;
  }
  
  .gpu-bar-container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .gpu-bar-bg {
    min-width: 100%;
    order: 3;
  }
}

/* Docker Containers Section */
.containers-section {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.containers-section h4 {
  margin: 0 0 1rem 0;
  font-size: 15px;
  color: #2c3e50;
  font-weight: 600;
}

.containers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 12px;
}

/* Docker Images Section */
.docker-images-section {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.docker-images-section h4 {
  margin: 0 0 1rem 0;
  font-size: 15px;
  color: #2c3e50;
  font-weight: 600;
}

/* Docker Containers and Images Names */
.docker-containers-section {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface-hover);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.docker-containers-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
}

.docker-names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.docker-name-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  transition: all 0.3s ease;
}

.docker-name-tag.running {
  background: linear-gradient(135deg, rgba(134, 239, 172, 0.1) 0%, rgba(167, 243, 208, 0.1) 100%);
  color: #059669;
  border: 1px solid rgba(134, 239, 172, 0.3);
}

.docker-name-tag.stopped {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(203, 213, 225, 0.1) 100%);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.docker-name-tag.image {
  background: linear-gradient(135deg, rgba(134, 239, 172, 0.08) 0%, rgba(167, 243, 208, 0.08) 100%);
  color: var(--text-main);
  border: 1px solid rgba(134, 239, 172, 0.2);
}

.docker-name-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* System Logs Section */
.logs-container {
  background: #0a0c10;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 20px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.7;
}

.logs-container::-webkit-scrollbar {
  width: 6px;
}

.logs-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.log-line {
  padding: 4px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.log-line:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 1);
}

.log-line:last-child {
  border-bottom: none;
}

/* Process List Styles */
.process-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.process-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #86efac 0%, #a7f3d0 50%, #d1fae5 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.process-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(134, 239, 172, 0.3);
  background: #ffffff;
}

.process-item:hover::before {
  opacity: 1;
}

.process-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #86efac 0%, #a7f3d0 100%);
  color: white;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(134, 239, 172, 0.3);
  flex-shrink: 0;
}

.process-item:nth-child(1) .process-rank {
  background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
  box-shadow: 0 4px 12px rgba(253, 224, 71, 0.3);
}

.process-item:nth-child(2) .process-rank {
  background: linear-gradient(135deg, #a7f3d0 0%, #86efac 100%);
  box-shadow: 0 4px 12px rgba(167, 243, 208, 0.3);
}

.process-item:nth-child(3) .process-rank {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  box-shadow: 0 4px 12px rgba(209, 250, 229, 0.3);
}

.process-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.process-name-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.process-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.process-pid {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  background: var(--surface-hover);
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-block;
  width: fit-content;
}

.process-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.metric-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.metric-bar-container {
  width: 100%;
  height: 6px;
  background: var(--surface-hover);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.metric-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%);
  animation: shimmer 2s infinite;
}

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

.cpu-bar {
  background: linear-gradient(90deg, #86efac 0%, #a7f3d0 50%, #d1fae5 100%);
  box-shadow: 0 0 8px rgba(134, 239, 172, 0.4);
}

.memory-bar {
  background: linear-gradient(90deg, #6ee7b7 0%, #86efac 50%, #a7f3d0 100%);
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.4);
}

.process-command {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface-hover);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  overflow: hidden;
  position: relative;
}

.command-icon {
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.7;
}

.command-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

/* Network Interface Styles */
.network-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.network-item {
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.network-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #86efac 0%, #a7f3d0 50%, #d1fae5 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.network-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(134, 239, 172, 0.3);
  background: #ffffff;
}

.network-item:hover::before {
  opacity: 1;
}

.network-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.network-name-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #86efac 0%, #a7f3d0 100%);
  border-radius: 8px;
  flex-shrink: 0;
}

.network-name-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.network-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.network-ip {
  font-size: 12px;
  font-weight: 500;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
  transition: all 0.3s ease;
}

.network-ip.has-ip {
  background: linear-gradient(135deg, rgba(134, 239, 172, 0.1) 0%, rgba(167, 243, 208, 0.1) 100%);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.2);
}

.network-ip.no-ip {
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.network-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.network-detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.network-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface-hover);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.network-detail-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.network-detail-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.network-traffic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.traffic-item {
  padding: 10px 12px;
  background: var(--surface-hover);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.traffic-item:hover {
  background: var(--bg-color);
  border-color: var(--border-color);
}

.traffic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.traffic-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.traffic-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

@media (max-width: 768px) {
  .containers-grid {
    grid-template-columns: 1fr;
  }
  
  .process-item {
    flex-direction: column;
    gap: 10px;
  }
  
  .process-rank {
    align-self: flex-start;
  }
  
  .process-metrics {
    gap: 8px;
  }
  
  .network-detail-row,
  .network-traffic {
    grid-template-columns: 1fr;
  }
}
