/* 自定义样式 - 在线资源分享网站 */

/* 全局 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
}

/* 资源卡片悬停效果 */
.resource-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* 下载按钮动画 */
.download-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.download-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.download-btn:hover::after {
    width: 300px;
    height: 300px;
}
.download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(0,0,0,0.2);
}

/* 收藏按钮 */
.favorite-btn.active {
    color: #EF4444;
}

/* 搜索框 */
.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 分页器 */
.pagination-btn {
    transition: all 0.2s;
}
.pagination-btn:hover:not(.active):not(:disabled) {
    background-color: #EFF6FF;
    color: #2563EB;
}
.pagination-btn.active {
    background-color: #2563EB;
    color: white;
}

/* 后台侧边栏 */
.admin-sidebar a.active {
    background-color: #1E40AF;
    color: white;
}

/* 管理后台表格 */
.admin-table tr:hover {
    background-color: #F9FAFB;
}

/* Toast提示 */
.toast {
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
}
@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 标签样式 */
.tag-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: #EFF6FF;
    color: #1D4ED8;
    margin-right: 4px;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 拖拽上传区域 */
.upload-zone {
    border: 2px dashed #D1D5DB;
    transition: all 0.3s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}
