:root {
    --primary: 210 100% 50%; /* #0078FF */
    --primary-dark: 210 100% 40%; /* #0061CC */
    --secondary: 200 18% 46%; /* #5F7D8C */
    --success: 120 100% 35%; /* #00A136 */
    --danger: 0 80% 50%; /* #DF2525 */
    --warning: 40 100% 50%; /* #FFA500 */
    --dark: 210 29% 24%; /* #2C3E50 */
    --light: 210 17% 95%; /* #ECEFF1 */
    --white: 0 0% 100%; /* #FFFFFF */
    --body-bg: 210 33% 98%; /* #F7F9FA */
    --border-color: 210 14% 83%; /* #CED4DA */
}

/* Base Styles */
body {
    background-color: hsl(var(--body-bg));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: hsl(var(--dark));
    line-height: 1.5;
}

.app-title {
    color: hsl(var(--primary-dark));
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.main-content {
    min-height: calc(100vh - 160px);
    padding: 1rem 0;
}

.verification-container {
    border: 1px solid hsl(var(--border-color));
    border-radius: 12px;
    overflow: hidden;
}

/* Step Indicator Styles */
.verification-steps {
    margin-bottom: 2rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 10px;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 35px;
    left: 15%;
    right: 15%;
    height: 2px;
    background-color: hsl(var(--border-color));
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 33.333%;
}

.step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: hsl(var(--light));
    border: 2px solid hsl(var(--border-color));
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-icon img {
    width: 32px;
    height: 32px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 5px hsla(var(--primary), 0.2);
}

.step.active .step-icon img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.step.completed .step-icon {
    background-color: hsl(var(--success));
    border-color: hsl(var(--success));
}

.step.completed .step-icon img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--secondary));
    text-align: center;
    transition: all 0.3s ease;
}

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

.step.completed .step-label {
    color: hsl(var(--success));
    font-weight: 600;
}

/* Camera Container Styles */
.camera-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    border: 2px dashed hsla(var(--white), 0.7);
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    pointer-events: none;
}

.step-instruction {
    background-color: hsla(var(--dark), 0.7);
    color: hsl(var(--white));
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.preview-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Captured Previews */
.captured-previews-container {
    margin-top: 2rem;
}

.preview-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    color: hsl(var(--dark));
}

.preview-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.preview-item {
    width: 120px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid hsl(var(--secondary));
    transition: all 0.3s ease;
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: hsla(var(--dark), 0.7);
    color: hsl(var(--white));
    padding: 0.25rem 0;
    font-size: 0.75rem;
    text-align: center;
}

/* Verification Results */
.verification-results {
    margin-top: 1rem;
}

.verification-results .alert {
    margin-bottom: 0;
    padding: 0.75rem 1rem;
}

/* Camera Controls */
.camera-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.camera-controls button {
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.camera-controls .btn-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.capture-btn {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

.capture-btn:hover, .capture-btn:focus {
    background-color: hsl(var(--primary-dark));
    border-color: hsl(var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px hsla(var(--dark), 0.15);
}

.next-btn {
    background-color: hsl(var(--success));
    border-color: hsl(var(--success));
}

.next-btn:hover, .next-btn:focus {
    background-color: hsl(120 100% 30%);
    border-color: hsl(120 100% 30%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px hsla(var(--dark), 0.15);
}

/* Completion Form */
.completion-form {
    margin-top: 2rem;
}

.completion-form .alert {
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .app-title {
        font-size: 1.5rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
    }
    
    .step-icon img {
        width: 24px;
        height: 24px;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .camera-controls button {
        min-width: 110px;
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }
    
    .preview-item {
        width: 100px;
    }
    
    .preview-item img {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .step-indicator::after {
        left: 20%;
        right: 20%;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
    }
    
    .step-icon img {
        width: 20px;
        height: 20px;
    }
    
    .step-instruction {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-controls button {
        width: 100%;
    }
}
