.efv-container {
    --efv-primary: #2563eb;
    --efv-secondary: #1e40af;
    --efv-accent: #f59e0b;
    --efv-background: #f8fafc;
    --efv-text: #1e293b;
    --efv-button-text: #ffffff;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: var(--efv-background);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    position: relative;
}

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

.efv-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--efv-text);
    margin: 0 0 10px 0;
}

.efv-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

.efv-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.efv-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.efv-dropzone:hover,
.efv-dropzone.efv-dragover {
    border-color: var(--efv-primary);
    background: rgba(37, 99, 235, 0.05);
}

.efv-upload-icon {
    width: 60px;
    height: 60px;
    color: var(--efv-primary);
    margin-bottom: 16px;
}

.efv-dropzone-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--efv-text);
    margin: 0 0 8px 0;
}

.efv-dropzone-or {
    color: #94a3b8;
    font-size: 14px;
    margin: 12px 0;
}

.efv-browse-btn {
    display: inline-block;
    background: var(--efv-primary);
    color: var(--efv-button-text);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.efv-browse-btn:hover {
    background: var(--efv-secondary);
}

.efv-file-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 16px 0 0 0;
}

.efv-preview-container {
    position: relative;
    text-align: center;
}

.efv-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.efv-change-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.efv-change-photo:hover {
    background: rgba(0, 0, 0, 0.9);
}

.efv-options-section {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.efv-option-group {
    margin-bottom: 24px;
}

.efv-option-group:last-child {
    margin-bottom: 0;
}

.efv-option-label {
    display: block;
    font-weight: 600;
    color: var(--efv-text);
    margin-bottom: 10px;
    font-size: 15px;
}

.efv-select,
.efv-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: var(--efv-text);
    transition: border-color 0.2s ease;
}

.efv-select:focus,
.efv-input:focus {
    outline: none;
    border-color: var(--efv-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.efv-coating-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.efv-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--efv-text);
    transition: all 0.2s ease;
}

.efv-chip:hover {
    border-color: var(--efv-primary);
}

.efv-chip.efv-chip-active {
    background: var(--efv-primary);
    border-color: var(--efv-primary);
    color: var(--efv-button-text);
}

.efv-chip-icon {
    font-size: 16px;
}

.efv-color-chips {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.efv-color-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
    background: none;
    border: none;
}

.efv-color-chip .efv-chip-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

.efv-color-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.efv-color-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--efv-text);
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    max-width: 100%;
}

.efv-color-chip:hover {
    transform: scale(1.08);
}

.efv-color-chip.efv-color-active .efv-chip-swatch {
    border-color: var(--efv-text);
}

.efv-color-chip.efv-color-active {
    transform: scale(1.08);
}

.efv-color-chip.efv-color-active .efv-color-name {
    font-weight: 700;
    color: var(--efv-primary);
}

.efv-color-chip.efv-color-hidden {
    display: none;
}

.efv-color-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.efv-color-chip.efv-color-active .efv-color-check {
    opacity: 1;
}

.efv-selected-color {
    font-size: 14px;
    color: #64748b;
    margin: 12px 0 0 0;
}

.efv-blend-sliders-group {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.efv-slider-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.efv-slider-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.efv-slider-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.efv-slider-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--efv-text);
    min-width: 90px;
    flex-shrink: 0;
}

.efv-blend-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.efv-blend-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--efv-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.efv-blend-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--efv-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.efv-slider-percent {
    font-size: 13px;
    font-weight: 600;
    color: var(--efv-primary);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.efv-estimate-box {
    background: linear-gradient(135deg, var(--efv-primary), var(--efv-secondary));
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.efv-estimate-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.efv-estimate-value {
    font-size: 28px;
    font-weight: 700;
}

.efv-estimate-note {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
}

.efv-generate-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--efv-accent);
    color: var(--efv-button-text);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.efv-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.efv-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.efv-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.efv-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: efv-spin 0.8s linear infinite;
}

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

.efv-result-section {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.efv-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.efv-result-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--efv-text);
}

.efv-back-btn {
    background: none;
    border: none;
    color: var(--efv-primary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.efv-back-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

.efv-result-image-container {
    position: relative;
    text-align: center;
    margin-bottom: 24px;
}

.efv-result-image-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.efv-result-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    border-radius: 0 0 12px 12px;
}

.efv-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.efv-overlay-btn svg {
    width: 18px;
    height: 18px;
}

.efv-download-btn {
    background: var(--efv-primary);
    color: white;
}

.efv-download-btn:hover {
    background: var(--efv-secondary);
}

.efv-quote-btn {
    background: var(--efv-accent);
    color: white;
}

.efv-quote-btn:hover {
    filter: brightness(1.1);
}

.efv-change-color-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--efv-text);
}

.efv-change-color-btn:hover {
    background: white;
}

.efv-color-change-section {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 16px;
}

.efv-color-change-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.efv-color-change-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--efv-text);
}

.efv-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: all 0.2s ease;
}

.efv-cancel-btn:hover {
    background: #e2e8f0;
    color: var(--efv-text);
}

.efv-cancel-btn svg {
    width: 16px;
    height: 16px;
}

.efv-color-change-sliders {
    margin-top: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.efv-apply-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--efv-accent);
    color: var(--efv-button-text);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.efv-apply-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.efv-result-info {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.efv-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.efv-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.efv-detail-label {
    font-size: 13px;
    color: #64748b;
}

.efv-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--efv-text);
}

.efv-detail-value.efv-highlight {
    color: var(--efv-primary);
}

.efv-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 100;
}

.efv-loading-content {
    text-align: center;
    padding: 40px;
}

.efv-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--efv-primary);
    border-radius: 50%;
    animation: efv-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.efv-loading-content h3 {
    margin: 0 0 10px 0;
    color: var(--efv-text);
}

.efv-loading-content p {
    color: #64748b;
    margin: 0 0 20px 0;
}

.efv-loading-progress {
    width: 200px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.efv-loading-bar {
    height: 100%;
    width: 30%;
    background: var(--efv-primary);
    animation: efv-progress 2s ease-in-out infinite;
}

@keyframes efv-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.efv-error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 16px 48px 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 1000;
    max-width: 90%;
}

.efv-error-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
}

.efv-error-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .efv-container {
        padding: 10px;
        margin: 0 10px;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    
    .efv-container .efv-main,
    .efv-container .efv-result-section,
    .efv-container .efv-options-section {
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    
    .efv-title {
        font-size: 22px;
    }
    
    .efv-dropzone {
        padding: 30px 20px;
    }
    
    .efv-coating-chips {
        flex-direction: column;
    }
    
    .efv-chip {
        justify-content: center;
    }
    
    .efv-result-header {
        justify-content: center;
    }
    
    .efv-result-header h3 {
        text-align: center;
    }
    
    .efv-result-header .efv-back-btn {
        display: none;
    }
    
    .efv-result-image-container {
        position: relative;
        margin: 0 -10px;
    }
    
    .efv-result-image-container img {
        width: 100%;
        max-height: none;
        display: block;
        border-radius: 0;
        cursor: pointer;
    }
    
    .efv-result-overlay {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        padding: 12px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
        border-radius: 0;
    }
    
    .efv-overlay-btn {
        width: auto;
        min-width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
    }
    
    .efv-overlay-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .efv-overlay-btn .efv-btn-label {
        display: none;
    }
    
    .efv-download-btn {
        background: var(--efv-primary);
    }
    
    .efv-quote-btn {
        background: var(--efv-accent);
    }
    
    .efv-change-color-btn {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .efv-result-details {
        grid-template-columns: 1fr;
    }
    
    .efv-color-change-section {
        padding: 16px;
        margin: 0 -10px;
    }
    
    .efv-color-change-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .efv-cancel-btn {
        width: 100%;
        justify-content: center;
    }
    
    .efv-color-chips {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        gap: 10px;
        max-width: 300px;
        margin: 0 auto;
    }

    .efv-blend-sliders-group {
        padding: 10px 6px;
        margin-left: -4px;
        margin-right: -4px;
    }

    .efv-slider-name {
        min-width: 55px;
        font-size: 11px;
    }
    
    .efv-slider-item {
        gap: 4px;
    }
    
    .efv-slider-color {
        width: 18px;
        height: 18px;
    }

    .efv-slider-percent {
        min-width: 32px;
        font-size: 12px;
    }

    .efv-blend-slider {
        height: 10px;
    }

    .efv-blend-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    .efv-blend-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }

    .efv-color-change-sliders {
        padding: 10px 6px;
    }
}

.efv-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.efv-fullscreen-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.efv-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
