:root {
    --primary-color: #4a6fa5;
    --primary-light: #6e8cbf;
    --primary-dark: #2d4a78;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 2.2rem;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.help-text {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--primary-dark);
}

button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

button .icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
}

.hidden {
    display: none;
}

.result-details {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 15px;
    background-color: var(--secondary-color);
}

#vehicleInfo, #valueEstimation {
    margin-bottom: 30px;
}

h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.range-container {
    margin-top: 25px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.range-slider {
    position: relative;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 25px 0;
}

.slider-track {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: #e0e0e0;
    border-radius: 4px;
}

.slider-fill {
    position: absolute;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px 0 0 4px;
    width: 50%;
}

.slider-thumb {
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.slider-thumb:hover, .slider-thumb.active {
    transform: translate(-50%, -50%) scale(1.1);
}

.current-value {
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.api-notice {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #777;
}

.info-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.info-row .label {
    width: 140px;
    font-weight: 600;
    color: #555;
}

.info-row .value {
    flex: 1;
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 100px;
    width: 100%;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Step navigation styles */
.step-container {
    position: relative;
    width: 100%;
}

.step-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.step-progress-bar {
    position: absolute;
    top: 14px;
    left: 0;
    height: 4px;
    background-color: var(--border-color);
    width: 100%;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.85rem;
    color: #777;
    transition: color 0.3s ease;
}

.step-item.active .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-item.active .step-label {
    color: var(--primary-dark);
    font-weight: 600;
}

.step-item.completed .step-circle {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-content {
    position: relative;
}

.step-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-pane.active {
    display: block;
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.next-step {
    margin-left: auto;
}

.prev-step {
    background-color: #6c757d;
}

.prev-step:hover {
    background-color: #5a6268;
}

/* Select styles */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper:after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #777;
    pointer-events: none;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    appearance: none;
    background-color: white;
    cursor: pointer;
    transition: border 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

/* Grid layouts for selection options */
.brands-grid, .models-grid, .years-grid, .versions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.brand-item, .model-item, .year-item, .version-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brand-item:hover, .model-item:hover, .year-item:hover, .version-item:hover {
    border-color: var(--primary-light);
    background-color: var(--secondary-color);
}

.brand-item.selected, .model-item.selected, .year-item.selected, .version-item.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: white;
}

.brand-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 5px;
}

.search-box {
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Version item styling */
.version-item {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    height: 100%;
}

.version-item .version-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.version-item .version-details {
    font-size: 0.8rem;
    color: #666;
}

.versions-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Pagination controls for year selection */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
}

.page-control {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.page-control:hover {
    background-color: var(--primary-dark);
}

.page-indicator {
    font-size: 14px;
    color: #666;
}

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

/* Responsive styles */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }
    
    .brands-grid, .models-grid, .versions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .years-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .step-label {
        font-size: 0.75rem;
    }
    
    .step-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .next-step, .prev-step {
        width: 100%;
        margin: 0;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-control {
        width: 100%;
    }
    
    .page-indicator {
        margin: 5px 0;
    }
}