:root {
  --bg: #0b0d10;
  --bg-elevated: #14171b;
  --bg-card: #16191d;
  --border: #262b31;
  --border-light: #33393f;
  --text-primary: #f2f3f4;
  --text-secondary: #9aa2ab;
  --text-muted: #656d76;
  --accent: #4fc7d6;
  --accent-strong: #6fe0ee;
  --status-active-bg: #143a2f;
  --status-active-text: #4fd68a;
  --status-active-border: #1f5c46;
  --status-expired-bg: #3a1414;
  --status-expired-text: #e05656;
  --status-expired-border: #5c1f1f;
  --error: #e05656;
  --radius: 10px;
  --max-width: 560px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 24px;
  display: flex;
  justify-content: center;
  background: var(--bg-elevated);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.brand-divider {
  width: 1px;
  height: 16px;
  background: var(--border-light);
}

.brand-sub {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* Main */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 40px;
}

.lookup-section {
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 32px;
  line-height: 1.5;
}

.lookup-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#car-plate {
  flex: 1 1 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  letter-spacing: 0.03em;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#car-plate::placeholder {
  color: var(--text-muted);
}

#car-plate:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 199, 214, 0.15);
}

#car-plate.input-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(224, 86, 86, 0.15);
}

.check-btn {
  flex: 0 0 auto;
  background: var(--accent);
  color: #06181a;
  border: none;
  border-radius: var(--radius);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 168px;
}

.check-btn:hover {
  background: var(--accent-strong);
}

.check-btn:active {
  transform: translateY(1px);
}

.check-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(6, 24, 26, 0.35);
  border-top-color: #06181a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.hint-text {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Result area */

.result-area {
  width: 100%;
  max-width: var(--max-width);
  margin-top: 32px;
}

.message-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  animation: fade-in 0.2s ease;
}

.message-box.error {
  border-color: var(--status-expired-border);
}

.message-icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: block;
}

.message-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}

.message-body {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Warranty card */

.warranty-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  animation: fade-in 0.2s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-badge.status-active {
  background: var(--status-active-bg);
  color: var(--status-active-text);
  border-color: var(--status-active-border);
}

.status-badge.status-expired {
  background: var(--status-expired-bg);
  color: var(--status-expired-text);
  border-color: var(--status-expired-border);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.card-plate {
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-bottom: 20px;
}

.card-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-field.full-width {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.field-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

.coverage-section {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.coverage-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.coverage-list li {
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coverage-list li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

/* Responsive */

@media (max-width: 480px) {
  .page-title {
    font-size: 26px;
  }

  .lookup-form {
    flex-direction: column;
  }

  .check-btn {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .coverage-list {
    grid-template-columns: 1fr;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
