/**
 * 组件样式
 */

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #e6f7ff;
    color: #1890ff;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
}

.badge-warning {
    background: #fff7e6;
    color: #fa8c16;
}

.badge-danger {
    background: #fff2f0;
    color: #ff4d4f;
}

/* 按钮 - 现代化设计 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.35);
    filter: brightness(1.05);
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: #fff;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.25);
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(82, 196, 26, 0.35);
    filter: brightness(1.05);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(255, 77, 79, 0.35);
    filter: brightness(1.05);
}

/* 按钮尺寸 */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: 12px;
}

/* 按钮禁用状态 */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 输入框 */
.input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.input-lg {
    padding: 12px 20px;
    font-size: 16px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag:hover {
    transform: scale(1.05);
}

/* 头像 */
.avatar {
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-md {
    width: 48px;
    height: 48px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 100px;
    height: 100px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    font-size: 14px;
}

/* 加载 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--theme-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 分割线 */
.divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

/* 图标 */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

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

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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