/* Builder App Styles */

/* Layout */
.builder-app {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.builder-background {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.builder-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(10, 10, 10, 0.7), 
        rgba(10, 10, 10, 0.6), 
        rgba(10, 10, 10, 0.8));
}

.builder-content {
    position: relative;
    z-index: 10;
}

/* Header */
.builder-header {
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 70px;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icons i {
    font-size: 1.75rem;
    color: #dc2626;
}

.builder-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    width: fit-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: #dc2626;
    color: #ffffff;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.step.active {
    color: #dc2626;
}

.step.completed {
    color: #22c55e;
}

.step-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: rgba(255, 107, 53, 0.2);
    border-color: #dc2626;
}

.step.completed .step-circle {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.step-line {
    width: 4rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.step span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Build Steps */
.build-step {
    display: none;
}

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

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

.step-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-header i {
    font-size: 2rem;
    color: #dc2626;
}

.step-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.vin-input,
.manual-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.vin-input:focus,
.manual-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.char-counter {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #dc2626;
}

.btn-white {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #ffffff;
}

.btn-white:hover {
    background: #f5f5f5;
}

.btn-full {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Vehicle Info */
.vehicle-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.vehicle-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vehicle-details i {
    color: #22c55e;
    font-size: 1.5rem;
}

.vehicle-details h3 {
    margin: 0;
    font-size: 1.25rem;
}

.vehicle-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Build Types */
.build-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.build-type-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.build-type-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #dc2626;
    transform: translateY(-5px);
}

.build-type-card.selected {
    border-color: #dc2626;
    background: rgba(255, 107, 53, 0.1);
}

.build-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.build-type-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.build-type-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.focus-tags span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Build Info */
.build-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.build-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.build-icon-large {
    font-size: 2rem;
}

.build-details h3 {
    margin: 0;
    font-size: 1.25rem;
}

.build-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Parts */
.parts-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.parts-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    text-transform: capitalize;
}

.parts-grid {
    display: grid;
    gap: 1rem;
}

.part-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.part-card:hover {
    border-color: rgba(255, 107, 53, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.part-card.selected {
    border-color: #dc2626;
    background: rgba(255, 107, 53, 0.1);
}

.part-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.part-details h4 {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.part-details .brand {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.part-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.part-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
}

.part-rating {
    color: #fbbf24;
    font-size: 0.875rem;
}

.part-selection {
    color: #dc2626;
    font-size: 1.5rem;
}

/* Review */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.build-preview-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.build-preview-card h2 {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.build-preview {
    aspect-ratio: 16/9;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.preview-content {
    text-align: center;
    z-index: 10;
}

.preview-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.preview-content h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.preview-content p {
    color: #dc2626;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons .btn {
    flex: 1;
}

.build-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.parts-list-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.parts-list-card h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.part-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.part-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.part-category {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.part-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.part-brand {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.part-price-display {
    font-weight: 600;
    color: #dc2626;
}

.total-cost-card {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    border-radius: 15px;
    padding: 2rem;
}

.cost-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-details p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.cost-details h3 {
    font-size: 2rem;
    margin: 0;
    color: #ffffff;
}

/* Brands */
.brands-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.brands-container h2 {
    margin-bottom: 2rem;
    color: #ffffff;
}

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

.brand-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    border-color: #dc2626;
    background: rgba(255, 255, 255, 0.08);
}

.brand-card h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.brand-card p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Community Gallery */
.gallery-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.gallery-container h2 {
    margin-bottom: 2rem;
    color: #ffffff;
}

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

.community-build-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.community-build-card:hover {
    border-color: #dc2626;
    transform: translateY(-5px);
}

.build-image {
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}

.build-image i {
    font-size: 3rem;
}

.build-info {
    padding: 1.5rem;
}

.build-info h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.build-info p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.view-link {
    color: #dc2626;
    font-size: 0.875rem;
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .builder-title {
        font-size: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step span {
        display: none;
    }
    
    .step-line {
        display: none;
    }
    
    .build-types-grid {
        grid-template-columns: 1fr;
    }
    
    .step-card {
        padding: 1.5rem;
    }
    
    .build-info-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .community-builds-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .tab-navigation {
        width: 100%;
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1;
        justify-content: center;
    }
}