* {
  box-sizing: border-box;
}

:root {
  /* Premium Electric Velocity Palette - Light Mode */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #38bdf8;
  --accent: #f59e0b;
  --light: #f8fafc;
  --dark: #0f172a;
  --success: #10b981;
  --warning: #f59e0b;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;

  /* Modern Glassmorphism & Effects */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --glow-primary: 0 0 15px rgba(14, 165, 233, 0.4);

  --transition-duration: 0.3s;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

:root.dark-mode {
  /* Premium Electric Velocity Palette - Dark Mode */
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --secondary: #0ea5e9;
  --accent: #fbbf24;
  --light: #0f172a;
  --dark: #f8fafc;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #1e293b;

  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glow-primary: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Add transition properties to elements that change color */
body,
.calculator-section,
.tab,
input,
select,
button,
.results,
.disclaimer {
  transition:
    background-color var(--transition-duration) var(--transition-timing),
    color var(--transition-duration) var(--transition-timing),
    border-color var(--transition-duration) var(--transition-timing),
    box-shadow var(--transition-duration) var(--transition-timing);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

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

h1 {
  color: var(--text-primary);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.calculator-section {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  position: relative;
}

.tab-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0.5rem;
  background: var(--gray-100);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

.tab:active {
  transform: scale(0.98);
}

.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--glow-primary);
  color: white;
}

.input-group {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 2px var(--primary),
    0 0 0 4px rgba(79, 70, 229, 0.1);
}

button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s var(--transition-timing);
  transform: translateY(0);
  box-shadow: var(--shadow);
}

button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

button:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

.results {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  margin-top: 2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: none;
  animation: slideIn 0.3s ease-out;
  color: var(--text-primary);
  border-radius: 0.75rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results h3 {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.results p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.results p:last-child {
  border-bottom: none;
}

.error {
  color: var(--accent);
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(244, 63, 94, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(244, 63, 94, 0.3);
  display: none;
}

.loading {
  display: none;
  text-align: center;
  margin: 2rem 0;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

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

.location-suggestions {
  position: absolute;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

#map-container {
  margin-top: 2rem;
}

#map {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 400px;
  margin-bottom: 1rem;
}

.map-controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.map-controls button {
  flex: 1;
}

.location-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: var(--gray-100);
  border-radius: 0.5rem;
}

.location-toggle button {
  width: auto;
}

.engine-details {
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.engine-details-card {
  background: var(--gray-100);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

.engine-details-card h4 {
  margin-top: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.engine-details-card h5 {
  margin: 1rem 0 0.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.engine-details-card p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.engine-details-card ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.engine-details-card li {
  margin-bottom: 0.5rem;
}

.icon {
  margin-right: 0.5rem;
  vertical-align: text-bottom;
}

.tab-content {
  display: none;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.input-section {
  background: var(--gray-100);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 500;
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.map-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gray-100);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.map-button:hover {
  background: var(--gray-200);
  color: var(--primary);
  transform: none;
}

.map-button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.toggle-buttons {
  display: flex;
  gap: 0.5rem;
}

.toggle-buttons .tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.loading-text {
  margin-left: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.disclaimer {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.disclaimer .info-icon {
  flex-shrink: 0;
  color: var(--warning);
  margin-top: 0.25rem;
}

.disclaimer p,
.disclaimer ul,
.disclaimer li {
  color: var(--text-secondary);
}

.disclaimer p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.disclaimer ul {
  margin: 0.75rem 0 0 0;
  padding-left: 1.25rem;
}

.disclaimer li {
  margin-bottom: 0.375rem;
}

.disclaimer li:last-child {
  margin-bottom: 0;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 2rem;
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.dark-mode-toggle label {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin: 0;
}

.dark-mode-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dark-mode-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: .4s;
  border-radius: 28px;
}

.dark-mode-toggle .slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.dark-mode-toggle input:checked+.slider {
  background-color: var(--primary);
}

.dark-mode-toggle input:checked+.slider:before {
  transform: translateX(22px);
}

.dark-mode-toggle .icon {
  color: var(--text-primary);
}

.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--gray-200);
  color: var(--primary);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.about-container {
  max-width: 1400px;
  padding: 2rem;
  margin: 0 auto;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.hero-section {
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 6rem;
  position: relative;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: 2rem;
}

.hero-section h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about-section {
  margin-bottom: 8rem;
  padding: 0;
  border: none;
  background: none;
  position: relative;
}

.about-section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.goal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.goal-card {
  padding: 2.5rem;
  border-radius: 20px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}


.goal-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glow-primary);
  border-color: var(--primary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.feature-card {
  padding: 2.5rem;
  border-radius: 20px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}


.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-primary);
  border-color: var(--primary);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.result-type {
  padding: 2.5rem;
  border-radius: 20px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}


.result-type:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(79, 70, 229, 0.2);
}

.step {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.step-number {
  width: 32px;
  height: 32px;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.tip-card {
  padding: 2rem;
  border-radius: 1rem;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}


.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(79, 70, 229, 0.2);
}

.sub-steps {
  margin: 0.5rem 0 0 2rem;
  list-style-type: disc;
  color: var(--text-secondary);
}

.sub-steps li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.sub-steps li:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .calculator-section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
  }

  .tab-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .tab {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .input-section {
    padding: 1rem;
  }

  .input-group {
    margin-bottom: 1rem;
  }

  label {
    font-size: 1rem;
    margin-bottom: 0.375rem;
  }

  input[type="text"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    padding: 0.875rem;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0.5rem;
  }

  button {
    min-height: 48px;
    padding: 0.875rem;
    font-size: 1rem;
  }

  .location-toggle {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .toggle-buttons {
    flex-direction: row;
    width: 100%;
  }

  .toggle-buttons .tab {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  #map {
    height: 250px;
    border-radius: 0.5rem;
  }

  .map-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .map-controls button {
    width: 100%;
  }

  .results {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }

  .results h3 {
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
  }

  .results p {
    font-size: 0.95rem;
    padding: 0.75rem 0;
  }

  .loading {
    margin: 1.5rem 0;
  }

  .loading-text {
    font-size: 1rem;
  }

  .error {
    padding: 0.875rem;
    font-size: 0.95rem;
    margin-top: 0.75rem;
  }

  .suggestion-item {
    padding: 0.875rem;
    min-height: 44px;
  }

  .disclaimer {
    padding: 1rem;
    margin: 1rem 0 1.5rem 0;
    flex-direction: column;
    gap: 0.75rem;
  }

  .disclaimer .info-icon {
    margin-bottom: -0.5rem;
  }

  .disclaimer p {
    font-size: 0.875rem;
  }

  .disclaimer ul {
    margin-top: 0.5rem;
  }

  .navigation {
    margin: 1rem 0;
    padding: 0.5rem;
  }

  .nav-link {
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
  }

  .about-section {
    margin-bottom: 4rem;
  }

  .about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .about-container {
    padding: 1rem;
  }

  .about-content {
    padding: 1rem 0;
  }

  .hero-section {
    padding: 2rem 0;
    margin-bottom: 3rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    margin: 1rem 0 2rem;
  }

  .goal-cards,
  .feature-grid,
  .results-grid {
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .goal-card,
  .feature-card,
  .result-type {
    padding: 1.5rem;
  }

  .step {
    gap: 1rem;
  }

  .step-number {
    width: 28px;
    height: 28px;
  }

  .step p {
    font-size: 1rem;
  }

  .tips-grid {
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .tip-card {
    padding: 1.5rem;
  }

  .sub-steps {
    margin-left: 1.5rem;
  }

  .sub-steps li {
    font-size: 0.9rem;
  }
}

@supports (-webkit-overflow-scrolling: touch) {
  body {
    -webkit-overflow-scrolling: touch;
  }
}

html {
  scroll-behavior: smooth;
}

.input-group+.input-group {
  margin-top: 1.25rem;
}

/* Dark mode specific adjustments */
:root.dark-mode .goal-card,
:root.dark-mode .feature-card,
:root.dark-mode .result-type {
  background: var(--bg-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

:root.dark-mode .hero-section h1 {
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: initial;
}

.gradient-text {
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: initial;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  padding: 1.5rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-item:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.4s;
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header-row h3 {
  margin: 0;
  font-size: 1.5rem;
}

.card-header-row .card-icon {
  margin-bottom: 0;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.premium-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(var(--glow-primary));
}

.floating-icon {
  animation: float 6s ease-in-out infinite;
}

.pulse-circle {
  animation: pulse 2s ease-in-out infinite;
}

.rotating-wheel {
  transform-origin: center;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.blinking-light {
  animation: blink 3s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.gauge-needle {
  transform-origin: center;
}

.floating-dot {
  animation: float 3s ease-in-out infinite;
}

.wave-line {
  animation: wave 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes wave {

  0%,
  100% {
    d: path('M30 50 L70 50');
  }

  50% {
    d: path('M30 45 L70 55');
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.goal-card,
.feature-card,
.result-type,
.tip-card {
  transform-origin: center;
  transition: all 0.3s ease;
}

.goal-card:hover,
.feature-card:hover,
.result-type:hover,
.tip-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--glow-primary);
}

.mission-section {
  position: relative;
  overflow: hidden;
}

.mission-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.step-number {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-clip: padding-box;
  /* Default but explicit */
}

@media (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .stat-item {
    animation-delay: 0.2s;
  }

  .stat-icon {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .card-icon {
    font-size: 1.75rem;
  }
}

.feedback-section {
  max-width: 600px;
  margin: 6rem auto;
  text-align: center;
}

.feedback-intro {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out;
}

.feedback-form {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.6s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}


.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-group textarea {
  height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.submit-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.submit-button:active {
  transform: translateY(0);
}

.send-icon {
  transition: transform 0.3s ease;
}

.submit-button:hover .send-icon {
  transform: translateX(4px);
}

.feedback-success {
  text-align: center;
  animation: fadeIn 0.6s ease-out;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.success-icon {
  color: var(--success);
  margin-bottom: 1rem;
  animation: successAnimation 0.6s ease-out;
}

.feedback-success h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feedback-success p {
  color: var(--text-secondary);
}

@keyframes successAnimation {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .navigation {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    align-items: center;
  }

  .nav-links {
    width: auto;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    gap: 0.35rem;
  }

  .nav-link svg {
    width: 14px;
    height: 14px;
  }

  .dark-mode-toggle {
    margin-top: 0;
    padding: 0.2rem 0.4rem;
    gap: 0.25rem;
  }

  .dark-mode-toggle label {
    width: 40px;
    height: 22px;
  }

  .dark-mode-toggle .slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }

  .dark-mode-toggle input:checked+.slider:before {
    transform: translateX(18px);
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .stat-item {
    padding: 1rem;
  }

  .feedback-section {
    margin: 3rem auto;
    padding: 0 1rem;
  }

  .feedback-form {
    padding: 1.5rem;
  }

  .feedback-intro {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .card-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .input-group label {
    font-size: 0.8rem;
  }

  input[type="text"],
  input[type="number"],
  select,
  textarea {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .premium-icon {
    width: 40px;
    height: 40px;
  }
}

.footer {
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.github-link:hover {
  color: var(--primary);
  background: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.github-icon {
  transition: transform 0.3s ease;
}

.github-link:hover .github-icon {
  transform: rotate(360deg) scale(1.1);
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer {
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .github-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

.ask-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.ask-header {
  text-align: center;
  padding: 2rem 0;
}

.ask-header h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mode-toggle {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mode-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.mode-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.ask-main {
  width: 100%;
  margin: 0 auto;
}

.ask-section {
  display: none;
  animation: fadeInUp 0.5s ease;
}

.ask-section.active {
  display: block;
}

.ask-form,
.compare-form {
  width: 100%;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.ask-input {
  flex-grow: 1;
  padding: 1.25rem;
  padding-right: 60px;
  background: transparent;
  border: none;
  font-size: 1.05rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
  overflow: hidden;
  min-height: 60px;
  max-height: 200px;
  line-height: 1.5;
  margin: 0;
  width: 100%;
}

.ask-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.send-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: scale(1.05) rotate(15deg);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.send-icon {
  width: 18px;
  height: 18px;
}

.vehicles-container {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.vehicle-input {
  flex: 1;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.vehicle-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.vehicle-input:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.vehicle-input h3 {
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.2rem;
}

.comparison-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.comparison-submit-wrapper {
  margin-top: 2rem;
}

.ask-examples {
  margin-top: 4rem;
}

.ask-examples h2 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 600;
}

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

.example-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.example-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.example-card:hover {
  background: var(--bg-primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.example-card:hover::before {
  opacity: 1;
}

.example-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.example-card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

.chat-response {
  margin-top: 2rem;
  animation: fadeInUp 0.5s ease;
}

.response-content {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.response-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.response-content h3 {
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.response-content h4 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.response-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.response-content li {
  margin-bottom: 0.5rem;
}

.loading-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  color: var(--accent);
  text-align: center;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .ask-header h1 {
    font-size: 2rem;
  }

  .mode-toggle {
    flex-direction: column;
    width: 100%;
  }

  .mode-btn {
    width: 100%;
  }

  .vehicles-container {
    flex-direction: column;
    gap: 1rem;
  }

  .comparison-divider {
    padding: 1rem 0;
  }

  .vehicle-input {
    width: 100%;
  }

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

  .ask-container {
    padding: 1rem;
  }

  .response-content {
    padding: 1.5rem;
  }
}

/* Dark mode styles for ask page */
:root.dark-mode .input-wrapper {
  background-color: var(--bg-secondary);
}

:root.dark-mode .example-card:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

:root.dark-mode .ask-input::placeholder {
  color: var(--gray-400);
}

:root.dark-mode .response-content {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Car icon specific animations */
.car-icon {
  margin-bottom: 2rem;
}

/* Enhanced defs with multiple gradients */
.car-icon defs linearGradient {
  --gradient-start: var(--primary);
  --gradient-end: var(--secondary);
}

:root.dark-mode .car-icon defs linearGradient {
  --gradient-start: var(--primary);
  --gradient-end: var(--accent);
}