* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

nav {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: #111;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.card h1 {
  margin-top: 0;
  font-size: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  margin-top: 1.5rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
}

input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 1rem;
}

button {
  margin-top: 0.5rem;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: #0071e3;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #0077ed;
}

.test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.test-buttons button {
  margin-top: 0;
  flex: 1 1 auto;
}

.result-box {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #1d1d1f;
  color: #f5f5f7;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  max-height: 260px;
  overflow: auto;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 380px;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
  padding: 2rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 11;
  overflow-y: auto;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6e6e73;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.sidebar-close:hover {
  background: none;
  color: #1d1d1f;
}

.sidebar-hint {
  font-size: 0.85rem;
  color: #6e6e73;
  text-align: left;
  margin-top: 0.5rem;
}

.sidebar-status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: #d70015;
  text-align: left;
}

/* Hide the auto-rendered reCAPTCHA badge - .recaptcha-disclosure below
   covers Google's required disclosure instead. */
.grecaptcha-badge {
  visibility: hidden;
}

.recaptcha-disclosure {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6e6e73;
}

.recaptcha-disclosure a {
  color: inherit;
}
