/* ===== 组件样式 ===== */

/* 卡片 */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.badge-success {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* 分隔线 */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示框 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-info {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 4px solid var(--text-primary);
}

.alert-success {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 4px solid var(--text-primary);
}

.alert-warning {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 4px solid var(--text-secondary);
}

.alert-danger {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 4px solid var(--text-primary);
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* 图标按钮 */
.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 输入框 */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* 搜索框 */
.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    padding-right: 3rem;
}

.search-box button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--text-secondary);
}
