/* 自定义样式 */

body {
    background-color: #f8f9fa;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 结果卡片样式 */
.result-card {
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 相似度进度条 - 已删除，现在不需要
.similarity-info .progress {
    border-radius: 4px;
}

.similarity-info .progress-bar {
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
}
*/

/* 图片预览样式 */
.img-fluid {
    border-radius: 0.375rem;
}

/* 裁切相关样式 */
.crop-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.crop-overlay {
    position: absolute;
    border: 2px solid #007bff;
    background: rgba(0, 123, 255, 0.1);
    cursor: move;
    user-select: none;
}

.crop-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #007bff;
    border: 1px solid #fff;
    cursor: nw-resize;
    border-radius: 50%;
}

.crop-handle.nw { 
    top: -5px; 
    left: -5px; 
}

.crop-handle.ne { 
    top: -5px; 
    right: -5px; 
    cursor: ne-resize; 
}

.crop-handle.sw { 
    bottom: -5px; 
    left: -5px; 
    cursor: sw-resize; 
}

.crop-handle.se { 
    bottom: -5px; 
    right: -5px; 
    cursor: se-resize; 
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.upload-area.dragover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .result-card .card-body {
        padding: 0.75rem;
    }
    
    /* 相似度信息样式 - 已删除，现在不需要
    .similarity-info {
        font-size: 0.8rem;
    }
    */
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* 文件夹标签 */
.folder-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

/* 搜索表单样式 */
.search-form {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 结果统计 */
.results-stats {
    background-color: #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.results-stats .stat-item {
    display: inline-block;
    margin-right: 2rem;
    margin-bottom: 0.5rem;
}

.results-stats .stat-label {
    font-weight: 600;
    color: #495057;
}

.results-stats .stat-value {
    color: #007bff;
    font-size: 1.1rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
