/* ═══════════════════════════════════════════════════════════════
   OpusWebcam V3.0 - Module de Correction
   Fichier: correction.css
   Description: Styles glassmorphiques pour la correction de cartes
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   MODAL PRINCIPAL
   ─────────────────────────────────────────────────────────────── */
.correction-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.correction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.correction-content {
    position: relative;
    background: rgba(20, 25, 50, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px;
    width: 90%;
    max-width: 950px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ───────────────────────────────────────────────────────────────
   HEADER
   ─────────────────────────────────────────────────────────────── */
.correction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.2), rgba(253, 160, 133, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
}

.correction-header h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.correction-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.correction-close:hover {
    color: #fff;
    background: rgba(245, 87, 108, 0.3);
    border-color: rgba(245, 87, 108, 0.5);
    transform: rotate(90deg);
}

/* ───────────────────────────────────────────────────────────────
   BODY - LAYOUT PRINCIPAL
   ─────────────────────────────────────────────────────────────── */
.correction-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 30px;
}

/* ───────────────────────────────────────────────────────────────
   PREVIEW DE LA CARTE SCANNEE
   ─────────────────────────────────────────────────────────────── */
.correction-preview {
    position: relative;
}

.correction-preview img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.correction-preview img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.confidence-display {
    position: absolute;
    top: 12px;
    right: 12px;
}

.confidence-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.confidence-badge.confidence-high {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    box-shadow: 0 4px 20px rgba(67, 233, 123, 0.5);
}

.confidence-badge.confidence-medium {
    background: linear-gradient(135deg, #f6d365, #fda085);
    box-shadow: 0 4px 20px rgba(246, 211, 101, 0.5);
}

.confidence-badge.confidence-low {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.5);
}

/* ───────────────────────────────────────────────────────────────
   FORMULAIRE DE CORRECTION
   ─────────────────────────────────────────────────────────────── */
.correction-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ───────────────────────────────────────────────────────────────
   SECTIONS
   ─────────────────────────────────────────────────────────────── */
.search-section,
.detail-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-section h5,
.detail-section h5 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-section h5::before,
.detail-section h5::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* ───────────────────────────────────────────────────────────────
   CHAMPS DE FORMULAIRE
   ─────────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.correction-modal .form-control {
    padding: 14px 18px;
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #fff;
    transition: all 0.3s ease;
}

.correction-modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.correction-modal .form-control:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15),
                0 4px 15px rgba(102, 126, 234, 0.2);
    background: rgba(10, 14, 39, 0.95);
}

.correction-modal .form-control[readonly] {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

/* ───────────────────────────────────────────────────────────────
   RESULTATS DE RECHERCHE
   ─────────────────────────────────────────────────────────────── */
.search-results {
    max-height: 320px;
    overflow-y: auto;
    background: rgba(10, 14, 39, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.search-placeholder {
    padding: 50px 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.search-placeholder i {
    font-size: 52px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
}

.search-placeholder p {
    margin: 0;
    font-size: 0.95rem;
}

.search-result-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(6px);
}

.search-result-item.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-left: 4px solid #667eea;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 70px;
    height: 98px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.search-result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.search-result-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.search-result-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-result-number {
    color: #4facfe;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-result-series {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.search-result-rarity {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badges de rareté */
.rarity-common {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.rarity-uncommon {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.rarity-rare {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.rarity-holo,
.rarity-holographic {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: #a78bfa;
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.rarity-ultra,
.rarity-secret {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.3), rgba(245, 87, 108, 0.3));
    color: #fbbf24;
    border: 1px solid rgba(246, 211, 101, 0.4);
}

/* ───────────────────────────────────────────────────────────────
   ETATS DE RECHERCHE
   ─────────────────────────────────────────────────────────────── */
.search-loading {
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.search-loading .spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-loading p {
    margin: 0;
    font-size: 0.9rem;
}

.search-no-results {
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.search-no-results i {
    font-size: 40px;
    margin-bottom: 12px;
    color: rgba(245, 87, 108, 0.5);
}

/* ───────────────────────────────────────────────────────────────
   APERCU DE LA CARTE SELECTIONNEE
   ─────────────────────────────────────────────────────────────── */
.selected-card-preview {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.1));
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 14px;
    display: flex;
    gap: 18px;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.selected-card-preview img {
    width: 85px;
    height: 119px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(67, 233, 123, 0.4);
}

.selected-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-card-info .card-id {
    font-weight: 700;
    color: #43e97b;
    font-size: 1.1rem;
}

.selected-card-info .card-rarity {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ───────────────────────────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────────────────────────── */
.correction-footer {
    display: flex;
    gap: 14px;
    padding: 24px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 24px 24px;
    justify-content: flex-end;
}

.correction-footer .btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.correction-footer .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.correction-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.correction-footer .btn-secondary:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.correction-footer .btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.correction-footer .btn-success:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.5);
}

.correction-footer .btn-info {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.correction-footer .btn-info:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.5);
}

/* ───────────────────────────────────────────────────────────────
   ANALYSE DES HASH
   ─────────────────────────────────────────────────────────────── */
.hash-analysis {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 25, 50, 0.99);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-radius: 24px;
    overflow-y: auto;
}

.hash-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 24px 24px 0 0;
}

.hash-analysis-header h5 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-analysis {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.close-analysis:hover {
    color: #fff;
    background: rgba(245, 87, 108, 0.3);
    border-color: rgba(245, 87, 108, 0.5);
    transform: rotate(90deg);
}

.hash-analysis-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fusion-analysis-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fusion-badge-small {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.review-badge-small {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #0a0e27;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.03); }
}

.agreement-info {
    color: #a78bfa;
    font-weight: 600;
    font-size: 0.9rem;
}

.hash-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.current-scan-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-card-badge {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0a0e27;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(79, 172, 254, 0.4);
}

/* Hash Analysis States */
.hash-analysis-loading {
    padding: 60px 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.hash-analysis-loading .spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.hash-analysis-loading p {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.hash-analysis-error {
    padding: 60px 30px;
    text-align: center;
}

.hash-analysis-error i {
    font-size: 56px;
    margin-bottom: 20px;
    color: #f5576c;
}

.hash-analysis-error p {
    margin: 0;
    font-size: 1rem;
    color: rgba(245, 87, 108, 0.9);
}

.hash-analysis-empty {
    padding: 60px 30px;
    text-align: center;
}

.hash-analysis-empty i {
    font-size: 56px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f6d365, #fda085);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hash-analysis-empty p {
    margin: 0;
    font-size: 1rem;
    color: rgba(246, 211, 101, 0.9);
}

.hash-results {
    padding: 24px 30px;
}

.hash-result-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.hash-result-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(6px);
}

.hash-result-item.current-match {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.1));
    border: 2px solid rgba(67, 233, 123, 0.4);
}

.hash-result-rank {
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    min-width: 50px;
    text-align: center;
}

.hash-result-item.current-match .hash-result-rank {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hash-result-image img {
    width: 85px;
    height: 119px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hash-result-info {
    flex: 1;
}

.hash-result-name {
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.hash-result-item.current-match .hash-result-name {
    color: #43e97b;
}

.hash-result-series {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.hash-distances {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.distance-badge {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.distance-badge.total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Siamese V2 Metrics */
.siamese-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.method-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method-badge.siamese {
    background: linear-gradient(135deg, #00c9ff, #92fe9d);
    color: #0a0e27;
    box-shadow: 0 2px 10px rgba(0, 201, 255, 0.3);
}

.method-badge.hash {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.similarity-badge {
    padding: 4px 10px;
    background: rgba(0, 201, 255, 0.15);
    color: #00c9ff;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.source-badge.enriched {
    padding: 4px 10px;
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #0a0e27;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.hash-result-action {
    display: flex;
    align-items: center;
}

.hash-result-action .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hash-result-action .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hash-result-action .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.hash-result-action .btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #0a0e27;
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.hash-result-action .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.5);
}

.hash-result-action .btn-sm {
    padding: 10px 16px;
    font-size: 0.85rem;
}

/* Confidence text dans hash results */
.hash-result-info .confidence-text {
    font-weight: 700;
    font-size: 0.9rem;
}

.hash-result-info .confidence-text.confidence-high,
.hash-result-info .confidence-text.high {
    color: #43e97b;
}

.hash-result-info .confidence-text.confidence-medium,
.hash-result-info .confidence-text.medium {
    color: #f6d365;
}

.hash-result-info .confidence-text.confidence-low,
.hash-result-info .confidence-text.low {
    color: #f5576c;
}

.current-match-label {
    margin-top: 8px;
    color: #43e97b;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ───────────────────────────────────────────────────────────────
   SCROLLBAR CUSTOM
   ─────────────────────────────────────────────────────────────── */
.correction-content::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.hash-analysis::-webkit-scrollbar {
    width: 8px;
}

.correction-content::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.hash-analysis::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.correction-content::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.hash-analysis::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 4px;
}

.correction-content::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.hash-analysis::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* ───────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .correction-content {
        width: 95%;
        max-width: none;
        margin: 10px;
    }

    .correction-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .correction-preview {
        max-width: 220px;
        margin: 0 auto;
    }

    .search-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .correction-header,
    .correction-footer {
        padding: 18px 20px;
    }

    .correction-body {
        padding: 20px;
    }

    .correction-footer {
        flex-direction: column;
    }

    .correction-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .hash-result-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .hash-result-rank {
        width: auto;
    }

    .hash-result-action {
        width: 100%;
    }

    .hash-result-action .btn {
        width: 100%;
    }

    .hash-distances {
        justify-content: center;
    }
}

/* ───────────────────────────────────────────────────────────────
   ANIMATIONS
   ─────────────────────────────────────────────────────────────── */
.search-result-item {
    animation: itemFadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.search-result-item:nth-child(1) { animation-delay: 0s; }
.search-result-item:nth-child(2) { animation-delay: 0.05s; }
.search-result-item:nth-child(3) { animation-delay: 0.1s; }
.search-result-item:nth-child(4) { animation-delay: 0.15s; }
.search-result-item:nth-child(5) { animation-delay: 0.2s; }

@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ───────────────────────────────────────────────────────────────
   FOCUS STATES
   ─────────────────────────────────────────────────────────────── */
.search-result-item:focus {
    outline: 2px solid rgba(102, 126, 234, 0.6);
    outline-offset: 2px;
}

.correction-close:focus,
.close-analysis:focus,
.correction-footer .btn:focus {
    outline: 2px solid rgba(102, 126, 234, 0.6);
    outline-offset: 2px;
}
