/* 发文章领奖励平台 - 样式文件 */

:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-bg: #f8f9fc;
}

body {
    background-color: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-reward {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dmxapi-balance {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* 任务卡片 */
.task-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.task-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* 任务列表样式（一行一个） */
.task-list-item .task-card {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.task-list-item .task-card:hover {
    transform: translateX(5px);
    border-left-color: var(--primary-color);
}

.task-list-item .task-title {
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.task-list-item .task-reward {
    font-size: 1.25rem;
}

.task-stats-inline {
    margin-top: 5px;
}

.task-reward {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
}

.task-reward small {
    font-size: 0.9rem;
    font-weight: 400;
}

.task-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #666;
}

.task-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-stats .stat-item i {
    color: var(--primary-color);
}

.remaining-badge {
    background: linear-gradient(135deg, var(--success-color) 0%, #169b6b 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.remaining-badge.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #dda20a 100%);
}

.remaining-badge.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #be2617 100%);
}

/* 进度条 */
.task-progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    margin: 10px 0;
}

.task-progress .progress-bar {
    background: linear-gradient(135deg, var(--success-color) 0%, #169b6b 100%);
}

/* 页面标题区 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
    color: #fff;
    padding: 30px 0;
    margin-bottom: 30px;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    margin: 0;
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card .stat-title {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

/* 状态标签 */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* 提交表单 */
.submit-form {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.submit-form .form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
}

.submit-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

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

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

/* 管理端整体布局 */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 管理端侧边栏 */
.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    min-height: 100vh;
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

/* 管理端主区域 */
.admin-main {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 管理端顶部导航 */
.admin-topbar {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 管理端内容区 */
.admin-content {
    padding: 30px;
    background: var(--light-bg);
    flex: 1;
}

/* 管理端响应式 */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 200px;
    }
    .admin-main {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-wrapper {
        flex-direction: column;
    }
}

/* 表格样式 */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    overflow: hidden;
}

.table-card .table {
    margin: 0;
}

.table-card .table th {
    background: #f8f9fc;
    border-top: none;
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* 批量创建表单 */
.batch-form textarea {
    min-height: 200px;
    font-family: monospace;
}

/* 审核卡片 */
.review-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-left: 4px solid var(--warning-color);
}

.review-card .user-name {
    font-weight: 600;
    color: #333;
}

.review-card .task-name {
    color: #666;
    font-size: 0.95rem;
}

.review-card .submit-url {
    background: #f8f9fc;
    padding: 10px 15px;
    border-radius: 8px;
    word-break: break-all;
    font-size: 0.9rem;
}

.review-card .submit-time {
    font-size: 0.85rem;
    color: #888;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.2);
}

.login-card h2 {
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #224abe 0%, #1a3a9e 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #169b6b 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #be2617 100%);
    border: none;
}

/* 分页 */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
}

/* 响应式 */
@media (max-width: 768px) {
    .task-stats {
        flex-direction: column;
        gap: 8px;
    }

    .page-header {
        padding: 20px 0;
    }

    .admin-sidebar {
        min-height: auto;
    }
}

/* 任务已满提示 */
.task-full-alert {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: none;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.task-full-alert i {
    font-size: 2rem;
    color: var(--danger-color);
    margin-bottom: 10px;
}

/* 已提交状态 */
.submitted-status {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.submitted-status.pending {
    border: 2px solid var(--warning-color);
}

.submitted-status.approved {
    border: 2px solid var(--success-color);
}

.submitted-status.rejected {
    border: 2px solid var(--danger-color);
}
