/* =====================================================
   VIN Decoder API - Complete Professional Redesign 2026
   Attractive, coherent, modern dark theme (navy + teal)
   Built on top of existing functionality.
   Optimized for user engagement (Adsense) + SEO.
   Same logo (logo.webp), full multilingual support.
   ===================================================== */

:root {
  --bg: #0b1120;
  --bg-elev: #111827;
  --bg-card: #1f2937;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --accent: #14b8a6;
  --accent-light: #5eead4;
  --border: #334155;
}

html, body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { color: var(--accent-light); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Attractive Professional Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative; /* for mobile dropdown positioning */
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: white; }
.logo img { height: 32px; width: auto; } /* Use same logo.webp */
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--text-muted); transition: color .1s; }
.nav-links a:hover { color: white; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: all .15s ease; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #0b1120; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--bg-elev); }

/* Hero - Attractive & User-Drawing */
.hero {
  padding: 70px 0 50px; text-align: center;
}
.hero h1 {
  font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -2px;
  margin-bottom: 16px; color: white;
}
.hero-subtitle {
  font-size: 20px; color: var(--text-muted); max-width: 620px; margin: 0 auto 28px;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Live Stats (pulls real value from DB - great for engagement) */
.stats {
  background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; text-align: center;
}
.stat .value { font-size: 26px; font-weight: 700; color: white; }
.stat .label { font-size: 12px; color: var(--text-muted); }

/* Beautiful Decoder Form & Results */
.decoder-box {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; padding: 28px;
  max-width: 820px; margin: 0 auto;
}
.vin-form { display: flex; gap: 10px; }
.vin-input {
  flex: 1; background: #0b1120; border: 1px solid var(--border); color: white;
  font-family: ui-monospace, monospace; font-size: 16px; padding: 14px 18px; border-radius: 12px;
}
.vin-input:focus { border-color: var(--accent); outline: none; }

.result-section {
  margin-top: 32px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
}
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
}
.result-item {
  background: var(--bg); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
}
.result-item .label { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.result-item .value { font-weight: 600; color: white; margin-top: 2px; }

/* Attractive Cards & Sections */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); border-color: #475569; }

.section { padding: 56px 0; }
.section h2 { font-size: 32px; font-weight: 700; margin-bottom: 24px; color: white; }

/* Brand Explorer - pulls real data, fun & engaging */
.brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
}
.brand {
  background: var(--bg-elev); border: 1px solid var(--border); padding: 12px 8px;
  border-radius: 12px; text-align: center; font-weight: 600; font-size: 13px;
  transition: all .15s;
}
.brand:hover { background: var(--accent); color: #0b1120; border-color: var(--accent); }

/* AdSense Improvements - Better placements for revenue without killing UX */
.ad-container {
  margin: 24px 0; text-align: center; min-height: 90px;
}
.ad-container ins { display: block; max-width: 100%; }

/* Footer */
footer {
  background: #070d1a; border-top: 1px solid var(--border); padding: 40px 0 24px;
  font-size: 13px; color: var(--text-muted);
}
footer a { color: var(--text-muted); }
footer a:hover { color: white; }

/* Professional Mobile Navbar - Desktop EXACT as original, Mobile hamburger + dropdown with buttons inside */

/* Hamburger - hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
  z-index: 300;
}
.nav-toggle:hover {
  background: var(--bg-elev);
  border-color: var(--accent);
}

/* The mobile dropdown (desplegable) */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 250;
  padding: 8px 0;
}

/* Open state */
.nav.is-open .mobile-nav {
  display: block;
}

/* Vertical links in mobile dropdown */
.mobile-nav .mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 4px 20px;
}

.mobile-nav .mobile-nav-links a {
  padding: 11px 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-nav .mobile-nav-links a:hover {
  color: white;
  background: rgba(255,255,255,0.03);
}
.mobile-nav .mobile-nav-links a:last-child {
  border-bottom: none;
}

/* Action buttons (Get Free Key + Dashboard) INSIDE the mobile dropdown */
.mobile-nav .mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.mobile-nav .mobile-nav-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  font-size: 14px;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }

  /* Show hamburger, hide desktop nav items from the main bar */
  .nav-toggle { display: block; }
  .nav .nav-links,
  .nav .nav-actions {
    display: none !important;
  }

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

/* Desktop - EXACT original layout (no changes) */
@media (min-width: 769px) {
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  /* The base .nav-links and .nav-actions styles (flex etc.) stay active for desktop */
}

/* Preserve old functionality classes while making them pretty */
.bg-white, .bg-green-50 { background: var(--bg-card) !important; }
.text-green-700, .text-green-600 { color: var(--accent) !important; }
.rounded-2xl { border-radius: 16px !important; }