/**
 * ============================================================================
 * 训练营模块样式 - 暗金轻奢主题
 * ============================================================================
 * 包含: 列表页 + 详情页
 * ============================================================================
 */

/* ==========================================================================
   列表页 - 页面头部横幅
   ========================================================================== */
.cp-banner {
    position: relative;
    padding: 60px 0 50px;
    background: linear-gradient(135deg, #0A0E14 0%, #161B22 50%, #0D1117 100%);
    overflow: hidden;
}

.cp-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cp-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cp-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cp-banner-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #E6EDF3;
    margin-bottom: 12px;
}

.cp-banner-title .gradient-text {
    background: linear-gradient(135deg, #C9A96E, #E8D5A3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cp-banner-desc {
    font-size: 1rem;
    color: #8B949E;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   列表页 - 筛选工具栏
   ========================================================================== */
.cp-toolbar {
    background: #161B22;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
    padding: 20px 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.cp-toolbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cp-search {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.cp-search-input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    font-size: 14px;
    color: #E6EDF3;
    background: #21262D;
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 8px;
    transition: all 0.2s;
}

.cp-search-input:focus {
    outline: none;
    border-color: #C9A96E;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.cp-search-input::placeholder {
    color: #484F58;
}

.cp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #484F58;
    font-size: 14px;
}

.cp-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-filter-label {
    font-size: 13px;
    color: #8B949E;
    white-space: nowrap;
}

.cp-filter-select {
    height: 42px;
    padding: 0 32px 0 12px;
    font-size: 14px;
    color: #E6EDF3;
    background: #21262D;
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B949E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s;
}

.cp-filter-select:focus {
    outline: none;
    border-color: #C9A96E;
}

.cp-filter-select option {
    background: #21262D;
    color: #E6EDF3;
}

.cp-sort-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-sort-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    color: #8B949E;
    background: transparent;
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cp-sort-btn:hover {
    color: #C9A96E;
    border-color: rgba(201, 169, 110, 0.3);
}

.cp-sort-btn.active {
    color: #0D1117;
    background: linear-gradient(135deg, #C9A96E, #B8943F);
    border-color: transparent;
    font-weight: 500;
}

.cp-toolbar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #8B949E;
    background: #21262D;
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* ==========================================================================
   列表页 - 训练营列表区域
   ========================================================================== */
.cp-list-section {
    padding: 40px 0 60px;
    background: #0D1117;
    min-height: 500px;
}

.cp-result-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 14px;
    color: #8B949E;
}

.cp-result-count {
    color: #C9A96E;
    font-weight: 600;
}

.cp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 训练营卡片增强 */
.cp-grid .camp-card {
    display: flex;
    flex-direction: column;
}

.cp-grid .camp-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.cp-grid .camp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.cp-grid .camp-card:hover .camp-image img {
    transform: scale(1.05);
}

.cp-grid .camp-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    z-index: 2;
}

.cp-grid .camp-status.upcoming {
    color: #C9A96E;
    background: rgba(201, 169, 110, 0.15);
    border: 1px solid rgba(201, 169, 110, 0.3);
}

.cp-grid .camp-status.active {
    color: #3FB950;
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.cp-grid .camp-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 11px;
    color: #0D1117;
    background: linear-gradient(135deg, #C9A96E, #E8D5A3);
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
}

.cp-grid .camp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.cp-grid .camp-title {
    font-size: 16px;
    font-weight: 600;
    color: #E6EDF3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.cp-grid .camp-desc {
    font-size: 13px;
    color: #8B949E;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.cp-grid .camp-mentor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.08);
}

.cp-grid .camp-mentor-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.cp-grid .camp-mentor-name {
    font-size: 13px;
    color: #8B949E;
}

.cp-grid .camp-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #8B949E;
}

.cp-grid .camp-meta i {
    color: #C9A96E;
    margin-right: 4px;
}

.cp-grid .camp-progress {
    margin-bottom: 14px;
}

.cp-grid .camp-progress-bar {
    height: 4px;
    background: #21262D;
    border-radius: 2px;
    overflow: hidden;
}

.cp-grid .camp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A96E, #E8D5A3);
    border-radius: 2px;
    transition: width 0.4s;
}

.cp-grid .camp-progress-text {
    font-size: 12px;
    color: #484F58;
    margin-top: 4px;
}

.cp-grid .camp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.cp-grid .camp-price {
    font-size: 20px;
    font-weight: 700;
    color: #C9A96E;
}

.cp-grid .camp-price-original {
    font-size: 13px;
    color: #484F58;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 400;
}

.cp-grid .camp-price-free {
    color: #10B981;
}

/* ==========================================================================
   列表页 - 空状态
   ========================================================================== */
.cp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.cp-empty-icon {
    font-size: 64px;
    color: #21262D;
    margin-bottom: 20px;
}

.cp-empty-title {
    font-size: 18px;
    color: #8B949E;
    margin-bottom: 8px;
}

.cp-empty-desc {
    font-size: 14px;
    color: #484F58;
}

/* ==========================================================================
   列表页 - 分页
   ========================================================================== */
.cp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}

.cp-page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #8B949E;
    background: #161B22;
    border: 1px solid rgba(201, 169, 110, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cp-page-btn:hover {
    color: #C9A96E;
    border-color: rgba(201, 169, 110, 0.3);
}

.cp-page-btn.active {
    color: #0D1117;
    background: linear-gradient(135deg, #C9A96E, #B8943F);
    border-color: transparent;
    font-weight: 600;
}

.cp-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.cp-page-ellipsis {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #484F58;
    font-size: 14px;
}

/* ==========================================================================
   详情页 - 面包屑
   ========================================================================== */
.cs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #484F58;
    padding: 16px 0;
}

.cs-breadcrumb a {
    color: #8B949E;
    text-decoration: none;
    transition: color 0.2s;
}

.cs-breadcrumb a:hover {
    color: #C9A96E;
}

.cs-breadcrumb .separator {
    color: #30363D;
}

/* ==========================================================================
   详情页 - 头部
   ========================================================================== */
.cs-hero {
    position: relative;
    padding: 0;
    background: #0A0E14;
    overflow: hidden;
}

.cs-hero-cover {
    position: relative;
    height: 320px;
    overflow: hidden;
}

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

.cs-hero-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, #0A0E14 0%, transparent 100%);
}

.cs-hero-body {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: -80px auto 0;
    padding: 0 24px 40px;
}

.cs-hero-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cs-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 20px;
}

.cs-hero-tag.status-upcoming {
    color: #C9A96E;
    background: rgba(201, 169, 110, 0.15);
    border: 1px solid rgba(201, 169, 110, 0.3);
}

.cs-hero-tag.status-active {
    color: #3FB950;
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.cs-hero-tag.featured {
    color: #0D1117;
    background: linear-gradient(135deg, #C9A96E, #E8D5A3);
    font-weight: 600;
}

.cs-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #E6EDF3;
    margin-bottom: 16px;
    line-height: 1.3;
}

.cs-hero-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cs-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8B949E;
}

.cs-hero-meta-item i {
    color: #C9A96E;
}

.cs-hero-meta-item strong {
    color: #E6EDF3;
}

.cs-hero-mentor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-hero-mentor img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================================================
   详情页 - 内容布局
   ========================================================================== */
.cs-content {
    padding: 0 0 60px;
    background: #0D1117;
}

.cs-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.cs-main {}

.cs-section {
    background: #161B22;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(201, 169, 110, 0.08);
}

.cs-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.cs-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #E6EDF3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-section-title i {
    color: #C9A96E;
}

/* 训练营描述 */
.cs-description {
    font-size: 15px;
    color: #8B949E;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 任务列表 */
.cs-task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-task-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #21262D;
    border-radius: 10px;
    transition: background 0.2s;
}

.cs-task-item:hover {
    background: #2D333B;
}

.cs-task-index {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #C9A96E;
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 8px;
}

.cs-task-info {
    flex: 1;
    min-width: 0;
}

.cs-task-name {
    font-size: 15px;
    font-weight: 500;
    color: #E6EDF3;
    margin-bottom: 4px;
}

.cs-task-desc {
    font-size: 13px;
    color: #8B949E;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 相关训练营 */
.cs-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cs-related-card {
    background: #21262D;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
}

.cs-related-card:hover {
    transform: translateY(-3px);
}

.cs-related-cover {
    height: 100px;
    overflow: hidden;
}

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

.cs-related-info {
    padding: 12px;
}

.cs-related-title {
    font-size: 14px;
    font-weight: 500;
    color: #E6EDF3;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-related-meta {
    font-size: 12px;
    color: #8B949E;
}

/* 详情页 - 右侧边栏 */
.cs-sidebar {}

.cs-sidebar-card {
    background: #161B22;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(201, 169, 110, 0.08);
}

.cs-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #E6EDF3;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-sidebar-title i {
    color: #C9A96E;
}

/* 报名卡片 */
.cs-price-box {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.cs-price-current {
    font-size: 2.4rem;
    font-weight: 700;
    color: #C9A96E;
}

.cs-price-current small {
    font-size: 14px;
    font-weight: 400;
    color: #8B949E;
}

.cs-price-original {
    font-size: 16px;
    color: #484F58;
    text-decoration: line-through;
    margin-left: 8px;
}

.cs-price-free {
    color: #10B981;
}

.cs-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cs-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.cs-info-label {
    color: #8B949E;
}

.cs-info-value {
    color: #E6EDF3;
    font-weight: 500;
}

.cs-info-value.full {
    color: #EF4444;
}

.cs-progress {
    margin-bottom: 20px;
}

.cs-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.cs-progress-label {
    color: #8B949E;
}

.cs-progress-value {
    color: #C9A96E;
    font-weight: 500;
}

.cs-progress-bar {
    height: 8px;
    background: #21262D;
    border-radius: 4px;
    overflow: hidden;
}

.cs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A96E, #E8D5A3);
    border-radius: 4px;
    transition: width 0.4s;
}

.cs-join-btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
}

.cs-join-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 导师卡片 */
.cs-mentor-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cs-mentor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(201, 169, 110, 0.3);
}

.cs-mentor-name {
    font-size: 16px;
    font-weight: 600;
    color: #E6EDF3;
    margin-bottom: 2px;
}

.cs-mentor-title {
    font-size: 13px;
    color: #8B949E;
}

.cs-mentor-rating {
    font-size: 13px;
    color: #C9A96E;
    margin-top: 4px;
}

.cs-mentor-rating i {
    margin-right: 2px;
}

/* 详情页 - 空状态 */
.cs-empty {
    text-align: center;
    padding: 40px 20px;
    color: #484F58;
    font-size: 14px;
}

.cs-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
    .cp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cs-layout {
        grid-template-columns: 1fr;
    }
    
    .cs-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .cp-banner {
        padding: 40px 0 30px;
    }

    .cp-banner-title {
        font-size: 1.6rem;
    }

    .cp-toolbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-search {
        min-width: 100%;
    }

    .cp-filter-group,
    .cp-sort-group {
        width: 100%;
    }

    .cp-sort-group {
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .cp-toolbar-toggle {
        display: flex;
    }

    .cp-toolbar-body {
        display: none;
    }

    .cp-toolbar-body.cp-toolbar-open {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .cp-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cp-result-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .cs-hero-cover {
        height: 200px;
    }

    .cs-hero-title {
        font-size: 1.5rem;
    }

    .cs-hero-meta {
        gap: 16px;
    }

    .cs-related-grid {
        grid-template-columns: 1fr;
    }

    .cs-section {
        padding: 20px;
    }

    .cs-sidebar-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .cp-pagination {
        gap: 4px;
    }

    .cp-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .cs-hero-body {
        padding: 0 16px 30px;
    }

    .cs-hero-title {
        font-size: 1.3rem;
    }
}
