Enhance vehicle selection in index.html by replacing text input with a dropdown menu featuring various car models from multiple brands. Update script.js to dynamically add a custom input field for 'Other model' selection. Revise styles.css for improved button and form control designs, including new animations and responsive adjustments.

This commit is contained in:
Alvin
2025-06-04 12:01:47 +02:00
parent 50fd74ec57
commit d6c53c19b2
4 changed files with 417 additions and 132 deletions

View File

@@ -38,105 +38,201 @@ body {
/* Navbar fallback */
.navbar {
background: var(--gradient-primary);
padding: 1rem 0;
box-shadow: var(--shadow);
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.navbar:hover {
box-shadow: var(--shadow-lg);
.navbar.scrolled {
background: rgba(17, 24, 39, 0.95);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
color: var(--white);
text-decoration: none;
font-size: 1.25rem;
font-size: 1.5rem;
font-weight: bold;
transition: transform 0.3s ease;
}
.navbar-brand:hover {
transform: scale(1.1);
}
.navbar-nav {
list-style: none;
display: flex;
gap: 1rem;
}
.nav-link {
color: var(--white);
text-decoration: none;
opacity: 0.8;
color: #fff !important;
font-weight: 500;
padding: 0.5rem 1rem !important;
transition: all 0.3s ease;
position: relative;
}
.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -2px;
left: 0;
background: var(--gradient-primary);
transition: width 0.3s ease;
.nav-link:hover {
color: #ef4444 !important;
}
.nav-link:hover::after,
.nav-link.active::after {
width: 100%;
}
.nav-link:hover,
.nav-link.active {
opacity: 1;
color: #f472b6;
}
/* Button fallback */
.btn {
display: inline-block;
padding: 0.5rem 1rem;
border: none;
border-radius: 0.25rem;
cursor: pointer;
text-decoration: none;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s ease, height 0.6s ease;
}
.btn:hover::before {
width: 300px;
height: 300px;
color: #ef4444 !important;
}
.btn-primary {
background: var(--gradient-primary);
color: var(--white);
box-shadow: var(--shadow);
background: linear-gradient(to right, #dc2626, #ea580c);
border: none;
color: white;
padding: 0.5rem 1.5rem;
border-radius: 0.375rem;
font-weight: 500;
transition: all 0.3s ease;
}
.btn-primary:hover {
background: linear-gradient(to right, #b91c1c, #c2410c);
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
background: linear-gradient(135deg, #7c3aed, #db2777);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-outline-secondary {
border: 2px solid #4b5563;
color: #9ca3af;
padding: 0.5rem 1.5rem;
border-radius: 0.375rem;
font-weight: 500;
transition: all 0.3s ease;
}
.btn-outline-secondary:hover {
border-color: #ef4444;
color: white;
transform: translateY(-2px);
}
.form-control {
background-color: #374151;
border: 1px solid #4b5563;
color: white;
padding: 0.75rem 1rem;
border-radius: 0.375rem;
transition: all 0.3s ease;
}
.form-control:focus {
background-color: #374151;
border-color: #ef4444;
box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
color: white;
}
.form-label {
color: #d1d5db;
font-weight: 500;
margin-bottom: 0.5rem;
}
.glass-nav {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-nav:hover {
background: rgba(17, 24, 39, 0.95);
}
@keyframes float {
0% {
transform: translateY(0px);
}
50% {
transform: translateY(-10px);
}
100% {
transform: translateY(0px);
}
}
.animate-float {
animation: float 3s ease-in-out infinite;
}
@keyframes pulse-slow {
0% {
opacity: 1;
}
50% {
opacity: 0.7;
}
100% {
opacity: 1;
}
}
.animate-pulse-slow {
animation: pulse-slow 3s ease-in-out infinite;
}
@keyframes spin-slow {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.animate-spin-slow {
animation: spin-slow 20s linear infinite;
}
@keyframes bounce-slow {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.animate-bounce-slow {
animation: bounce-slow 3s ease-in-out infinite;
}
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (max-width: 768px) {
.navbar-collapse {
background: rgba(17, 24, 39, 0.95);
backdrop-filter: blur(10px);
padding: 1rem;
border-radius: 0.5rem;
margin-top: 0.5rem;
}
.nav-link {
padding: 0.75rem 1rem !important;
}
}
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #1f2937;
}
::-webkit-scrollbar-thumb {
background: #ef4444;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #dc2626;
}
/* Grid fallback */
@@ -415,41 +511,6 @@ body {
border-top: 1px solid #374151;
}
/* Form Styles */
.form-control {
background-color: #374151;
border-color: #4b5563;
color: #fff;
}
.form-control:focus {
background-color: #374151;
border-color: #ef4444;
color: #fff;
box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}
/* Button Styles */
.btn-primary {
background: linear-gradient(to right, #ef4444, #f97316);
border: none;
}
.btn-primary:hover {
background: linear-gradient(to right, #dc2626, #ea580c);
}
.btn-outline-secondary {
border-color: #ef4444;
color: #ef4444;
}
.btn-outline-secondary:hover {
background: linear-gradient(to right, #ef4444, #f97316);
border-color: transparent;
color: #fff;
}
/* Search Results */
.search-result-item {
transition: all 0.3s ease;