/* Face Similarity Meter Tool Styles */

/* Image Canvas */
#imageCanvas1,
#imageCanvas2 {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 10px auto 0;
}

/* Similarity Result Card */
.similarity-result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    animation: fadeInUp 0.4s ease;
}

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

.similarity-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #212529;
}

.similarity-body {
    padding: 30px;
    text-align: center;
}

.similarity-meter {
    margin-bottom: 24px;
}

.similarity-percentage {
    font-size: 4rem;
    font-weight: 800;
    color: #052c65;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.similarity-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.similarity-bar-container {
    width: 100%;
    height: 32px;
    background: #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.similarity-bar {
    height: 100%;
    width: 0%;
    background: #198754;
    border-radius: 16px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.similarity-description {
    font-size: 1.1rem;
    color: #212529;
    font-weight: 600;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Loading Progress */
.loading-progress {
    margin-top: 10px;
}

.loading-progress .progress {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.loading-progress .progress-bar {
    background: linear-gradient(90deg, #052c65, #0a4b9e, #052c65);
    background-size: 200% 100%;
    animation: gradient-slide 1.5s ease infinite;
}

@keyframes gradient-slide {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

[data-bs-theme="dark"] #imageCanvas1,
[data-bs-theme="dark"] #imageCanvas2 {
    border-color: #495057;
    background: rgba(30, 34, 42, 0.6);
}

[data-bs-theme="dark"] .similarity-result-card {
    background: #212529;
    border-color: #3d4349;
}

[data-bs-theme="dark"] .similarity-header {
    background: #2c3136;
    border-bottom-color: #3d4349;
    color: #e9ecef;
}

[data-bs-theme="dark"] .similarity-percentage {
    color: #a855f7;
}

[data-bs-theme="dark"] .similarity-bar-container {
    background: #343a40;
}

[data-bs-theme="dark"] .similarity-description {
    background: #2c3136;
    border-color: #3d4349;
    color: #e9ecef;
}

[data-bs-theme="dark"] .loading-progress .progress {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .loading-progress .progress-bar {
    background: linear-gradient(90deg, #a855f7, #c084fc, #a855f7);
    background-size: 200% 100%;
}

/* Button filter fix */
.btn .filter-white {
    filter: brightness(0) invert(1);
}

.btn:hover .filter-white {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .btn .filter-white {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .btn:hover .filter-white {
    filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 768px) {

    .similarity-percentage {
        font-size: 3rem;
    }

    .similarity-body {
        padding: 20px;
    }

    #imageCanvas1,
    #imageCanvas2 {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 576px) {

    .similarity-percentage {
        font-size: 2.5rem;
    }

    .similarity-bar-container {
        height: 24px;
    }
}

/* Prevent text selection */
.form-label,
.form-text,
small.text-muted {
    user-select: none;
    cursor: default;
}
