  body {
  font-family: system-ui, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

#stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 85%;
  margin: 0 auto;
}

.project {
  position: relative;
  background: #1e1e1e;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, transform 0.2s;
    opacity: 0;
  animation: fadeInUp 0.4s ease forwards;

}

.project::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s;
}

.project.refreshing::after {
  opacity: 1;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.project:hover {
  transform: translateY(-3px);
}

.project.online {
  background: rgba(0, 128, 0, 0.3); 
  border-left: 4px solid #00ff00;
}

.project.offline {
  background: rgba(128, 0, 0, 0.3); 
  border-left: 4px solid #ff4444;
}

.project h3 {
  margin: 0 0 8px 0;
  color: #fff;
}

.project p {
  margin: 4px 0;
}


#toggle-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #3a3a3a, #555);
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  z-index: 1000;
}

#toggle-controls:hover {
  background: linear-gradient(135deg, #4a4a4a, #666);
  transform: scale(1.05);
}

.restart-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Visible when controls are toggled */
.show-controls .restart-btn {
  opacity: 1;
  pointer-events: all;
}




.restart-btn {
  opacity: 0;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  color: #333;
  transition: 0.2s;
  float:right;
}
.restart-btn:hover {
  background: linear-gradient(90deg, #ffc800, #ffe65a);
  transform: scale(1.05);
}
.restart-btn:active {
  transform: scale(0.97);
  background: #e5b700;
}


.stats {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9em;
}

.stats p {
  margin: 2px 0;
  color: #ccc;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project.animated {
  animation: none;
  opacity: 1;
}
