/* 主样式文件 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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

/* 工具卡片悬停效果 */
.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
}

/* 按钮动画 */
button, .btn {
    transition: all 0.3s ease;
}

button:active, .btn:active {
    transform: scale(0.98);
}

/* 文件拖拽区域 */
#dropZone.drag-over {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* 加载动画 */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标签页激活状态 */
.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    nav .hidden.md\\:flex {
        display: none !important;
    }

    /* 移动端导航菜单 */
    .mobile-menu {
        display: block;
    }
}

/* 文件列表项 */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-item:hover {
    background: #f3f4f6;
}

.file-item .file-name {
    flex: 1;
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .file-size {
    color: #6b7280;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.file-item .remove-btn {
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
}

.file-item .remove-btn:hover {
    color: #dc2626;
}

/* 进度条动画 */
#progressBar {
    transition: width 0.3s ease;
}

/* 下载链接样式 */
.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    color: #0369a1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

/* 模态框动画 */
.modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal > div {
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 工具选项面板 */
.option-group {
    margin-bottom: 1.5rem;
}

.option-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.option-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.option-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 复选框和单选框样式 */
.checkbox-wrapper,
.radio-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"],
.radio-wrapper input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* 提示信息 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 0.375rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* 打印样式 */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}
