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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  padding: 1rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

header {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

h1 {
  color: #2196F3;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h2 {
  color: #333;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #2196F3;
  padding-bottom: 0.5rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.online {
  background: #4CAF50;
}

.status-dot.offline {
  background: #f44336;
}

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

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.info-row:last-child {
  border-bottom: none;
}

.status-text {
  font-weight: 600;
  color: #666;
}

.status-text.success {
  color: #4CAF50;
}

.status-text.warning {
  color: #ff9800;
}

.status-text.error {
  color: #f44336;
}

.test-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #2196F3;
}

button {
  background: #2196F3;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

button.secondary-btn {
  background: #757575;
}

button.secondary-btn:hover:not(:disabled) {
  background: #616161;
}

#install-btn {
  width: 100%;
  margin-top: 1rem;
  background: #4CAF50;
}

#install-btn:hover {
  background: #45a049;
}

.hint {
  background: #E3F2FD;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #1565C0;
  border-left: 4px solid #2196F3;
}

.instructions {
  background: #FFF9C4;
  border-left: 4px solid #FFC107;
}

.instructions h2 {
  border-bottom-color: #FFC107;
}

.instructions ol {
  margin-left: 1.5rem;
}

.instructions li {
  margin-bottom: 1rem;
}

.instructions ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.instructions ul li {
  margin-bottom: 0.5rem;
}

.error-log {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.log-entry {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  border-left: 4px solid #2196F3;
}

.log-entry.error {
  background: #ffebee;
  border-left-color: #f44336;
}

.log-entry.info {
  background: #e3f2fd;
  border-left-color: #2196F3;
}

.error-text {
  color: #f44336;
  background: #ffebee;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

#clear-errors-btn {
  margin-top: 1rem;
  width: 100%;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: white;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .test-controls {
    flex-direction: column;
  }
  
  input[type="text"] {
    width: 100%;
  }
  
  button {
    width: 100%;
  }
  
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  button {
    display: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a237e 0%, #4a148c 100%);
  }
  
  .card, header {
    background: #1e1e1e;
    color: #e0e0e0;
  }
  
  h1, h2 {
    color: #64B5F6;
  }
  
  .info-row {
    border-bottom-color: #333;
  }
  
  input[type="text"] {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
  }
  
  .error-log {
    background: #2a2a2a;
    border-color: #444;
  }
}
