/* Car Code Decoder Web App - Matching Android App Design */

/* Root Variables - iOS/Android App Color Palette */
:root {
  --primary-color: #3b82f6; /* Lighter blue for better readability */
  --primary-dark: #2563eb; /* Darker blue for hover states */
  --secondary-color: #60a5fa; /* Light blue accent */
  --accent-color: #93c5fd; /* Very light blue */
  --success-color: #10b981; /* Green */
  --warning-color: #f59e0b; /* Orange */
  --danger-color: #ef4444; /* Red */
  --dark-bg: #0f172a; /* Dark blue background */
  --light-bg: #f8fafc; /* Light gray */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --card-bg-primary: #2563eb; /* Lighter blue for cards */
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--secondary-color);
}

body {
  padding-bottom: 80px; /* Space for fixed footer */
  background-color: var(--light-bg);
  min-height: 100vh;
}

/* Main content area */
main {
  padding-bottom: 2rem;
}

/* Navigation Bar - Lighter Blue */
.navbar-dark.bg-primary {
  background-color: var(--primary-color) !important;
}

.navbar-dark.bg-primary:hover {
  background-color: var(--primary-dark);
}

/* Navbar Brand Hover Effect */
.navbar-brand {
  transition: all 0.3s ease;
  position: relative;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-brand img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand:hover img {
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Navbar Links - Enhanced Hover Effects */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
  border-radius: 8px;
  padding: 8px 16px !important;
  margin: 0 4px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  color: rgba(255, 255, 255, 1) !important;
}

/* Underline Animation on Hover */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 70%;
}

/* Active Link Styling */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Navbar Text (Username) Hover Effect */
.navbar-text {
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
}

.navbar-text:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Navbar Toggler - Enhanced Mobile Menu Button */
.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  padding: 6px 10px;
  border-radius: 8px;
}

.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
  transition: transform 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-icon {
  transform: rotate(90deg);
}

/* Dropdown Menu Effects (if added later) */
.dropdown-menu {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 4px 8px;
}

.dropdown-item:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateX(5px);
}

/* Buttons - iOS/Android Style */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-light {
  background-color: white;
  border-color: #e2e8f0;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.btn-light:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Cards - Modern Rounded Style */
.card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

/* Credit Balance Card - Lighter Background */
.card.bg-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

/* Input Groups - Matching Android Style */
.input-group {
  border-radius: 12px;
  overflow: hidden;
}

.input-group .form-control {
  border-radius: 12px 0 0 12px;
  border: 1px solid #e2e8f0;
}

.input-group .btn {
  border-radius: 0 12px 12px 0;
}

/* Form Controls */
.form-control {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-control:hover {
  border-color: var(--accent-color);
}

/* Footer - Fixed at bottom of viewport */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: white;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer a {
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.footer a:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Utility Classes */
.shadow {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.rounded-lg {
  border-radius: 16px !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-secondary) !important;
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Link Hover Effects */
a {
  transition: color 0.3s ease;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding-bottom: 100px; /* More space for footer on mobile */
  }
  
  .footer {
    padding: 0.75rem 0;
    font-size: 0.875rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .btn-lg {
    padding: 10px 20px;
    font-size: 1rem;
  }
  
  /* Reduce animation intensity on mobile for performance */
  .nav-link:hover {
    transform: translateY(-1px);
  }
  
  .btn-primary:hover,
  .btn-success:hover,
  .btn-light:hover {
    transform: translateY(-1px);
  }
  
  .card:hover {
    transform: translateY(-2px);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background-color: var(--accent-color);
  color: var(--text-primary);
}

::-moz-selection {
  background-color: var(--accent-color);
  color: var(--text-primary);
}