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

:root {
  --bg:          #0a0a0f;
  --bg-card:     #12121a;
  --bg-input:    #1a1a26;
  --bg-result:   #0f1520;
  --border:      #1e1e30;
  --border-hover:#4a4aff;
  --accent:      #5c5cff;
  --accent-glow: rgba(92, 92, 255, 0.25);
  --accent-dim:  rgba(92, 92, 255, 0.08);
  --text:        #e8e8f0;
  --text-muted:  #6b6b8a;
  --text-hint:   #4a4a6a;
  --success:     #22d3a0;
  --success-bg:  rgba(34, 211, 160, 0.08);
  --error:       #ff5c7a;
  --error-bg:    rgba(255, 92, 122, 0.08);
  --private:     #a78bfa;
  --service:     #60a5fa;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover:0 12px 48px rgba(0, 0, 0, 0.6);
  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  line-height: 1.6;
  width: 100%;
}

/* ── Ambient background orbs ──────────────────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orb-drift 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #4040ff, transparent);
  top: -200px; left: -200px;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent);
  bottom: -150px; right: -150px;
  animation-delay: -9s;
}

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.05); }
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.header { 
  text-align: center; 
  margin: 60px auto 24px; 
  width: 100%;
  max-width: 100vw;
  overflow: visible;
  padding: 0 20px;
}

.site-title {
  font-size: clamp(1.75rem, 7.5vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, #8080ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(92, 92, 255, 0.3));
  animation: living-glow 5s ease-in-out infinite alternate;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 0 20px;
}

@keyframes living-glow {
  0% { filter: drop-shadow(0 0 8px rgba(92, 92, 255, 0.2)); }
  100% { filter: drop-shadow(0 0 25px rgba(92, 92, 255, 0.6)); }
}

.site-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── Search card ──────────────────────────────────────────────────────────── */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-card:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-glow);
}

/* ── Input ────────────────────────────────────────────────────────────────── */
.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-prefix {
  padding: 0 14px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  height: 56px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  user-select: none;
  letter-spacing: 0.05em;
}

.plate-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 0 18px;
  height: 56px;
  caret-color: var(--accent);
}
.plate-input::placeholder { color: var(--text-hint); font-weight: 400; letter-spacing: 0.08em; }

.input-hint {
  font-size: 0.78rem;
  color: var(--text-hint);
  margin-top: 8px;
  margin-left: 2px;
}
.input-hint strong { color: var(--text-muted); }

/* ── Submit button ────────────────────────────────────────────────────────── */
.submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 4px 20px rgba(92, 92, 255, 0.35);
}
.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(92, 92, 255, 0.5);
  filter: brightness(1.1);
}
.submit-btn:active:not(:disabled) {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 2px 10px rgba(92, 92, 255, 0.3);
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.submit-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Spinner */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.submit-btn.loading .btn-text  { display: none; }
.submit-btn.loading .btn-spinner { display: block; }

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

/* ── Result card ──────────────────────────────────────────────────────────── */
.result-card {
  background: var(--bg-result);
  border: 1px solid rgba(34, 211, 160, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 4px 24px rgba(34, 211, 160, 0.06);
  animation: fade-slide-up 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── Error card ───────────────────────────────────────────────────────────── */
.error-card {
  background: var(--error-bg);
  border: 1px solid rgba(255, 92, 122, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fade-slide-up 0.25s ease both;
}
.error-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.error-card p { font-size: 0.9rem; color: var(--error); line-height: 1.5; }

/* ── Result content ───────────────────────────────────────────────────────── */
.plate-display {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.plate-number {
  display: inline-block;
  max-width: 100%;
  background: linear-gradient(135deg, #1a1a35, #0d1525);
  border: 2px solid #2a2aff;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 8px 20px;
  font-family: 'Inter', monospace;
  box-shadow: 0 0 20px rgba(42, 42, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow-wrap: anywhere;
}

.result-grid {
  display: grid;
  gap: 14px;
}

.result-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}
.result-row:hover {
  border-color: rgba(92, 92, 255, 0.3);
  background: rgba(92, 92, 255, 0.04);
}

.row-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; line-height: 1; }

.row-content { flex: 1; min-width: 0; }

.row-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}
.row-value {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.row-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 5px;
  letter-spacing: 0.05em;
}
.badge-private { background: rgba(167, 139, 250, 0.12); color: var(--private); border: 1px solid rgba(167, 139, 250, 0.25); }
.badge-service  { background: rgba(96, 165, 250, 0.12); color: var(--service); border: 1px solid rgba(96, 165, 250, 0.25); }
.badge-unknown  { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Not found ────────────────────────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 16px;
}
.not-found-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.not-found-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.not-found-msg   { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: var(--text-hint);
  border-top: 1px solid var(--border);
}
.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer a:hover { color: var(--accent); text-decoration: underline; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 40px 16px 32px; }
  .header { margin: 36px auto 20px; padding: 0 16px; }
  .site-title {
    font-size: clamp(1.65rem, 10vw, 2.35rem);
    padding: 0;
  }
  .site-subtitle { font-size: 0.92rem; }
  .search-card { padding: 24px 20px; }
  .result-card { padding: 22px 18px; }
  .result-row {
    gap: 10px;
    padding: 12px 14px;
  }
  .plate-input {
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    padding: 0 14px;
  }
  .plate-number {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    padding: 8px 14px;
  }
}
