* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #f5f5f5;
  color: #333;
}

#root {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 250px;
  background: #2c3e50;
  color: white;
  padding: 20px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar h1 {
  font-size: 18px;
  margin-bottom: 30px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav button {
  background: none;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  transition: background 0.3s;
}

.sidebar-nav button:hover {
  background: #34495e;
}

.sidebar-nav button.active {
  background: #3498db;
}

.logout-btn {
  margin-top: auto;
  background: #e74c3c !important;
}

.logout-btn:hover {
  background: #c0392b !important;
}

.main-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header h2 {
  font-size: 24px;
  color: #2c3e50;
}

.auth-form {
  max-width: 400px;
  margin: 50px auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
  margin-bottom: 20px;
  text-align: center;
  color: #2c3e50;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #3498db;
  color: white;
  transition: background 0.3s;
}

button:hover {
  background: #2980b9;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.button-group button {
  flex: 1;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.server-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 5px solid #3498db;
  cursor: pointer;
  transition: all 0.3s;
}

.server-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.server-card h3 {
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #27ae60;
  animation: pulse 2s infinite;
}

.status-badge.offline {
  background: #e74c3c;
  animation: none;
}

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

.server-info {
  font-size: 13px;
  color: #666;
  margin: 8px 0;
}

.server-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.server-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
}

.modal-header h3 {
  color: #2c3e50;
}

.modal-close {
  float: right;
  background: none;
  color: #999;
  font-size: 24px;
  padding: 0;
  cursor: pointer;
}

.terminal {
  background: #1e1e1e;
  color: #00ff00;
  padding: 15px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
}

.logs {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logs h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.log-entry {
  padding: 10px;
  border-left: 3px solid #3498db;
  margin-bottom: 10px;
  font-size: 13px;
  background: #f9f9f9;
  border-radius: 3px;
}

.log-entry.error {
  border-left-color: #e74c3c;
  color: #e74c3c;
}

.log-entry.success {
  border-left-color: #27ae60;
  color: #27ae60;
}

.error-message {
  color: #e74c3c;
  padding: 10px;
  background: #fde8e8;
  border-radius: 4px;
  margin: 10px 0;
}

.success-message {
  color: #27ae60;
  padding: 10px;
  background: #e8f8f0;
  border-radius: 4px;
  margin: 10px 0;
}

.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

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