/* 任务墙页面样式 */

.task-wall-container {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 任务列表区域 */
.tasks-section {
    flex: 2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 公告区域 - 改为弹窗入口按钮 */
.announcement-box {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.announcement-header:hover {
    opacity: 0.95;
    transform: translateX(2px);
}

.announcement-header > i:first-child {
    font-size: 18px;
}

.announcement-header span {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.btn-edit-announcement {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-edit-announcement:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 使用说明查看器内容样式 */
.announcement-viewer-content {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 标签切换 */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
    bottom: -10px;
}

.tab-btn:hover {
    color: #8b5cf6;
}

.tab-btn.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.btn-add-task {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-add-task:hover {
    opacity: 0.9;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 任务卡片 */
.task-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.task-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.task-card.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.task-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin-right: 16px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.task-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.task-type-badge.feature {
    background: #dbeafe;
    color: #1e40af;
}

.task-type-badge.bug {
    background: #fee2e2;
    color: #991b1b;
}

.task-difficulty {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.task-difficulty i {
    font-size: 16px;
}

.task-description {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.task-description.can-collapse.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.task-expand-hint {
    color: #8b5cf6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 12px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #999;
    font-size: 14px;
}

.task-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-completion-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.btn-complete-task {
    background: white;
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-complete-task:hover {
    background: #8b5cf6;
    color: white;
}

.btn-complete-task.completed {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.btn-edit-task,
.btn-delete-task {
    background: #f3f4f6;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-task:hover {
    background: #e5e7eb;
}

.btn-delete-task:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* 星数榜区域 */
.leaderboard-section {
    flex: 1;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* 限时活动提示 - Banner横幅版本 */
.promotion-notice-banner {
    padding: 16px 24px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 12px;
    border: 2px solid #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    text-align: center;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    }
}

.promotion-notice-banner i {
    font-size: 24px;
    color: #dc2626;
    flex-shrink: 0;
}

.promotion-notice-banner .promotion-text {
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
    line-height: 1.6;
}

.leaderboard-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.leaderboard-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background: #f9fafb;
}

.leaderboard-rank {
    font-size: 18px;
    font-weight: 700;
    color: #999;
    min-width: 32px;
}

.leaderboard-rank.top1 {
    color: #fbbf24;
}

.leaderboard-rank.top2 {
    color: #94a3b8;
}

.leaderboard-rank.top3 {
    color: #cd7f32;
}

.leaderboard-user {
    flex: 1;
}

.leaderboard-username {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
}

.leaderboard-stats {
    font-size: 13px;
    color: #999;
}

.leaderboard-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
    font-size: 16px;
    font-weight: 700;
}

/* 任务模态框 */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.task-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.task-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.task-modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
}

.form-group textarea {
    resize: vertical;
}

.task-type-selector {
    display: flex;
    gap: 8px;
}

.type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.type-btn:hover {
    border-color: #8b5cf6;
}

.type-btn.selected {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #8b5cf6;
}

.difficulty-selector {
    display: flex;
    gap: 8px;
}

.difficulty-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    font-size: 14px;
}

.difficulty-btn:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.difficulty-btn.selected {
    border-color: #fbbf24;
    background: #fffbeb;
    color: #fbbf24;
}

.btn-save-task {
    width: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-task:hover {
    opacity: 0.9;
}

/* 加载和空状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.loading i {
    margin-right: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    min-width: 250px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: #22c55e;
}

.toast.error i {
    color: #ef4444;
}

.toast.info i {
    color: #3b82f6;
}

.toast.warning i {
    color: #f59e0b;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .task-wall-container {
        flex-direction: column;
    }

    .leaderboard-section {
        position: static;
    }

    .promotion-notice-banner {
        padding: 14px 20px;
    }

    .promotion-notice-banner .promotion-text {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .task-wall-container {
        padding: 20px 15px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .promotion-notice-banner {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .promotion-notice-banner i {
        font-size: 20px;
    }

    .promotion-notice-banner .promotion-text {
        font-size: 12px;
    }

    .task-card {
        padding: 16px;
    }

    .task-title {
        font-size: 16px;
    }

    .task-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .difficulty-selector {
        flex-direction: column;
    }
}

/* 星星兑换信息卡片 */
.stars-info-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.stars-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.stars-info-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.btn-view-redemptions {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-redemptions:hover {
    background: #2563eb;
}

.stars-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.stars-stat-item {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.stars-stat-item.highlight {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.stars-stat-label {
    font-size: 13px;
    color: #718096;
}

.stars-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.redeem-options-title {
    font-size: 13px;
    color: #4a5568;
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.redeem-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.redeem-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.option-number {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    min-width: 20px;
}

.option-label {
    font-size: 14px;
    color: #2d3748;
    flex: 1;
}

.option-arrow {
    font-size: 14px;
    color: #94a3b8;
}

.option-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
}

/* 任务列表标题 */
.tasks-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasks-section-title i {
    color: #667eea;
}

/* 兑换记录表格 */
.redemptions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.redemptions-table thead th {
    background: #f7fafc;
    padding: 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.redemptions-table tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2d3748;
}

.redemptions-table tbody tr:last-child td {
    border-bottom: none;
}

.redemptions-table tbody tr:hover {
    background: #f7fafc;
}

.redeem-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.redeem-type-badge.cash {
    background: #dcfce7;
    color: #16a34a;
}

.redeem-type-badge.api {
    background: #dbeafe;
    color: #2563eb;
}

.redeem-value {
    font-weight: 600;
}

/* 撤回任务按钮样式 */
.btn-revoke-task {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-revoke-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-revoke-task i {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stars-stats {
        flex-direction: column;
        gap: 12px;
    }

    .redeem-option {
        flex-wrap: wrap;
    }

    .option-value {
        width: 100%;
        text-align: right;
        margin-top: 4px;
    }

    .stars-info-card {
        padding: 16px;
    }

    .stars-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-view-redemptions {
        width: 100%;
    }

    .redemptions-table {
        font-size: 12px;
    }

    .redemptions-table thead th,
    .redemptions-table tbody td {
        padding: 8px 6px;
    }
}
