/* smartscan.css — Akıllı Tarama Modülü */

.scan-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.scan-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.scan-header h2 i {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scan-header p {
    margin: 6px 0 0;
    color: var(--text-mute);
    font-size: 0.88rem;
}

/* Upload Zone */
.scan-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.scan-upload-zone:hover,
.scan-upload-zone.dragover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.06);
}

.scan-upload-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #818cf8;
}

.scan-upload-text {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.scan-upload-hint {
    color: var(--text-mute);
    font-size: 0.8rem;
}

/* Preview Area */
.scan-preview-area {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
}

.scan-preview-img-wrap {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.scan-preview-img-wrap img {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
}

/* Scan Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6366f1, #8b5cf6, #6366f1, transparent);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.scan-line.active {
    opacity: 1;
    animation: scanLineMove 1.8s ease-in-out infinite;
}

@keyframes scanLineMove {
    0% {
        top: 0;
    }

    50% {
        top: calc(100% - 3px);
    }

    100% {
        top: 0;
    }
}

/* Status Text */
.scan-status-text {
    display: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #818cf8;
    padding: 8px;
}

/* Result Area */
.scan-result-area {
    display: none;
}

.scan-result-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    border-left: 4px solid var(--scan-accent, #6366f1);
}

.scan-result-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.scan-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.scan-result-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.scan-summary {
    margin: 4px 0 0;
    color: var(--text-mute);
    font-size: 0.85rem;
}

/* Detail Rows */
.scan-details {
    margin-bottom: 16px;
}

.scan-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.scan-detail-row:last-child {
    border-bottom: none;
}

.scan-detail-row span {
    color: var(--text-mute);
}

.scan-detail-row strong {
    color: var(--text);
}

.scan-text-content {
    background: var(--bg-secondary);
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Action Buttons */
.scan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scan-action-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.scan-action-btn.primary {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.scan-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.scan-action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.scan-action-btn.secondary:hover {
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 600px) {
    .scan-wrapper {
        padding: 0 4px 40px;
    }

    .scan-upload-zone {
        padding: 32px 16px;
    }

    .scan-actions {
        flex-direction: column;
    }

    .scan-action-btn {
        justify-content: center;
    }
}