/* public/assets/css/tools/image/reverse-image.css */

.revimg-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .revimg-workspace { grid-template-columns: 1fr; }
}

.revimg-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.revimg-panel-title {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
    color: var(--text-main);
    font-weight: 700;
}

/* 拖拽上传区 */
.revimg-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-body);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px; /* 增高一点适应比例 */
    position: relative;
    overflow: hidden;
}

.revimg-dropzone:hover, .revimg-dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb, 0, 102, 204), 0.04);
}

.revimg-drop-icon { font-size: 3.5rem; margin-bottom: 12px; opacity: 0.8; }
.revimg-drop-text { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.revimg-drop-hint { font-size: 0.9rem; color: var(--text-muted); }

/* 图片预览样式 */
.revimg-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.revimg-preview-container img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.revimg-btn-change {
    padding: 8px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}
.revimg-btn-change:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* 状态检测反馈框 */
.revimg-status-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s;
}

.status-placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    text-align: center;
    font-weight: 500;
}

.status-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    font-weight: 600;
}
.status-loading .spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(var(--primary-rgb, 0, 102, 204), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.status-success {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.status-title { font-size: 1.05rem; font-weight: 700; color: #10b981; display: flex; align-items: center; gap: 6px; }
.status-detail { font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 16px; font-family: monospace; }
.status-detail span { background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 4px; }

/* 搜索引擎卡片网格 */
.revimg-engines-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.3s;
}

.revimg-engines-grid.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}

.revimg-engine-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 右侧箭头小图标 */
.revimg-engine-card::after {
    content: "→";
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.revimg-engine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: var(--primary-color);
}
.revimg-engine-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.engine-icon { font-size: 2.2rem; }
.engine-info { display: flex; flex-direction: column; gap: 4px; }
.engine-name { font-size: 1.1rem; font-weight: 800; color: var(--text-main); }
.engine-desc { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }

.revimg-error-msg {
    margin-top: 16px; padding: 12px; background: #fef2f2;
    color: #dc2626; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
}

[data-theme="dark"] .revimg-engine-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .status-detail span { background: rgba(255,255,255,0.05); }