/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 640px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #16213e;
  letter-spacing: -0.02em;
}

.subtitle {
  margin-top: 0.5rem;
  color: #5a5a7a;
  font-size: 0.95rem;
}

/* Form */
.check-form {
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  padding: 0.35rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.input-group input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  outline: none;
  background: transparent;
}

.input-group input:focus {
  box-shadow: 0 0 0 2px #4361ee;
}

.input-group button {
  padding: 0.75rem 1.5rem;
  background: #4361ee;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.input-group button:hover {
  background: #3a56d4;
}

.input-group button:active {
  background: #2f48b8;
}

/* Spinner */
.htmx-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #5a5a7a;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.htmx-request .htmx-indicator {
  display: flex;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e0e0e0;
  border-top-color: #4361ee;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Result card */
.result {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid #ccc;
}

.result.up {
  border-left-color: #2ec4b6;
}

.result.down {
  border-left-color: #e71d36;
}

.result-header {
  margin-bottom: 1rem;
}

.status-badge {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Details list */
.result-details {
  display: grid;
  gap: 0.75rem;
}

.result-details > div {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.result-details dt {
  color: #5a5a7a;
  min-width: 110px;
  flex-shrink: 0;
}

.result-details dd {
  color: #1a1a2e;
  word-break: break-all;
}

.error-detail dd {
  color: #e71d36;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 2rem;
  color: #8a8aaa;
  font-size: 0.8rem;
}
