:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #8b5cf6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --success: #10b981;
  --error: #ef4444;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Glows */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  animation: pulse 8s infinite alternate;
}

.pattern-1 {
  top: -10%;
  left: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(15,23,42,0) 70%);
}

.pattern-2 {
  bottom: -10%;
  right: -5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, rgba(15,23,42,0) 70%);
  animation-delay: -4s;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.1); opacity: 0.6; }
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo i {
  color: #8b5cf6;
  -webkit-text-fill-color: #8b5cf6;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.avatar {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Search Box */
.search-container {
  width: 100%;
  max-width: 600px;
  margin-bottom: 3rem;
}

.search-box {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 1rem;
}

.search-icon {
  font-size: 1.5rem;
  color: var(--text-muted);
}

input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1rem;
  font-size: 1.25rem;
  color: var(--text-main);
  outline: none;
  font-weight: 500;
  text-transform: uppercase;
}

input::placeholder {
  color: rgba(148, 163, 184, 0.5);
  text-transform: none;
  font-weight: 400;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: var(--text-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 0 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.error-message {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  padding-left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease;
}

.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  animation: fadeIn 0.3s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

/* Results Area */
.results-container {
  width: 100%;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.result-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.vehicle-hero {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* Mercosul Plate Style */
.plate-display {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 2px solid #222;
  width: 160px;
  text-align: center;
}

.plate-header {
  background: #003399;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 0;
  letter-spacing: 1px;
}

.plate-number {
  color: #111;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Courier New', Courier, monospace;
  padding: 0.5rem;
  letter-spacing: 2px;
}

.vehicle-title h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: white;
}

.vehicle-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item .value {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

.actions-container {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .app-header {
    padding: 1rem 1.5rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .search-box {
    flex-direction: column;
    padding: 1rem;
  }
  
  .input-wrapper {
    padding: 0.5rem;
  }
  
  .btn-primary {
    padding: 1rem;
    justify-content: center;
  }
  
  .vehicle-hero {
    flex-direction: column;
    text-align: center;
  }
  
  .actions-container {
    flex-direction: column;
  }
}
