/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #FF9F45;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e08e3e;
}

/* 拖拽区域动画 */
#drop-area {
    transition: all 0.3s ease;
}

#drop-area.drag-over {
    border-color: #FF9F45;
    background-color: rgba(255, 159, 69, 0.05);
    transform: scale(1.01);
}

/* 算法选择动画 */
.algorithm-option {
    transition: all 0.2s ease;
}

.algorithm-option input[type="checkbox"]:checked + span {
    color: #FF9F45;
    font-weight: 500;
}

.algorithm-option input[type="checkbox"]:checked {
    accent-color: #FF9F45;
}

/* 结果卡片动画 */
.result-card {
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
}

/* 进度条动画 */
@keyframes progress-pulse {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

.progress-value {
    background-size: 200% 100%;
    animation: progress-pulse 1.5s ease infinite;
}

/* 导航链接样式 */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #FF9F45;
}

.nav-link.active {
    color: #FF9F45;
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FF9F45;
    border-radius: 2px;
}

/* 通知动画 */
@keyframes slide-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

#notification.show {
    animation: slide-in 0.3s forwards;
}

#notification.hide {
    animation: slide-out 0.3s forwards;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .algorithm-option {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
    
    #drop-area {
        padding: 2rem 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* 比较结果样式 */
.comparison-match {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgb(34, 197, 94);
}

.comparison-mismatch {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgb(239, 68, 68);
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}