:root {
  --bg: #f4f6f8;
  --bg-card: #ffffff;
  --text: #1c2226;
  --text-muted: #55606a;
  --border: #d7dde2;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --error: #c0392b;
  --success-bg: #eef6ff;
}

[data-theme="dark"] {
  --bg: #14181c;
  --bg-card: #1e2429;
  --text: #e8ecef;
  --text-muted: #a3adb5;
  --border: #333c44;
  --accent: #4c8dff;
  --accent-text: #0b1117;
  --error: #ff6b5e;
  --success-bg: #17242f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  height: 44px;
  width: 44px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.site-header h1 {
  font-size: 1.25rem;
  margin: 0;
}

#theme-toggle {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}

#theme-toggle:hover {
  border-color: var(--accent);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.lookup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.intro {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

select,
input[type="text"] {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

select:focus,
input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.warranty-link {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.warranty-link:hover {
  text-decoration: underline;
}

.serial-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.serial-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.icon-button {
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.icon-button:hover {
  border-color: var(--accent);
}

.icon-button.copied {
  border-color: var(--accent);
  color: var(--accent);
}

.format-hint {
  margin-top: 0.35rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: var(--success-bg);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.format-hint strong {
  color: var(--text);
}

.format-hint ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.actions-row button {
  flex: 1;
}

button[type="submit"] {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"]:hover {
  filter: brightness(1.05);
}

.secondary-button {
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button:hover {
  background: var(--success-bg);
}

.result {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: var(--success-bg);
  border: 1px solid var(--border);
}

.result.error {
  color: var(--error);
  background: transparent;
  border-color: var(--error);
}

.result dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}

.result dt {
  font-weight: 600;
  color: var(--text-muted);
}

.result dd {
  margin: 0;
}

.result .note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.disclaimer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.disclaimer h2 {
  font-size: 1rem;
  color: var(--text);
}

.disclaimer a {
  color: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
