* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.footer {
    display : none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #262626;
    line-height: 1.6;
}

.main-content {
    padding: 20px 20px;
}

.container {
    max-width: 1200px;
    width: 90%;         /* 小屏幕上占90% */
    margin: 0 auto;
}

/* 页面头部 */
.page-header {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 6px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-image {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.header-title-section {
    flex: 1;
}

.badge-container {
    margin-bottom: 12px;
}

.problem-count {
    display: inline-block;
    background: #ffa116;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
}

.page-subtitle {
    font-size: 16px;
    color: #8c8c8c;
    margin-bottom: 0;
}

/* 主体布局 */
.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 题目列表部分 */
.problems-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 右侧边栏 */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.overview-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.overview-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 16px;
}

.overview-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 8px;
}

.overview-list li {
    color: #595959;
    font-size: 14px;
    position: relative;
    padding-left: 14px;
    line-height: 1.6;
}

.overview-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffa116;
    font-weight: bold;
    font-size: 16px;
}

.badge-section {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.badge-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 16px;
}

.badge-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.badge-info {
    flex: 1;
}

.badge-name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 10px;
}

.badge-desc {
    font-size: 13px;
    color: #8c8c8c;
    line-height: 1.5;
    margin-bottom : 10px;
}

/* 题目分组 */
.topic-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;  /* 添加这一行 */
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.topic-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffa116 0%, #ff7c00 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.topic-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    flex-shrink: 0;
}

.topic-count {
    font-size: 14px;
    color: #8c8c8c;
    flex-shrink: 0;
}

.topic-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex: 1;
    max-width: 300px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: #8c8c8c;
    font-weight: 500;
    white-space: nowrap;
}

.problems-list {
    padding: 0;
}

.problem-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.problem-item:last-child {
    border-bottom: none;
}

.problem-item:hover {
    background-color: #fafafa;
}

.problem-checkbox {
    flex-shrink: 0;
}

.problem-checkbox input[type="checkbox"] {
    display: none;
}

.problem-checkbox label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}


.problem-checkbox input[type="checkbox"]:checked + label {
    background: #52c41a;
    border-color: #52c41a;
}

.problem-checkbox input[type="checkbox"]:checked + label:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.problem-title {
    flex: 1;
    font-size: 15px;
    color: #262626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1.4;
}

.problem-title:hover {
    color: #ffa116;
    text-decoration: none;
}

.problem-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    color: #595959;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}

.problem-difficulty {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.problem-difficulty.easy {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.problem-difficulty.medium {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.problem-difficulty.hard {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }

    .page-header {
        padding: 24px;
    }

    .header-left {
        flex-direction: column;
        text-align: center;
    }

    .header-image {
        width: 120px;
        height: 120px;
    }

    .page-title {
        font-size: 24px;
    }

    .topic-header {
        flex-wrap: wrap;
    }

    .topic-progress {
        width: 100%;
        max-width: none;
        margin-left: 48px;
        margin-top: 8px;
    }

    .problem-item {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .problem-difficulty {
        margin-left: 36px;
    }

    .problem-difficulty.unknown {
      background: #f5f5f5;
      color: #8c8c8c;
      border: 1px solid #d9d9d9;
    }
}
.topic-completed {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.topic-completed svg {
    flex-shrink: 0;
}

.completed-text {
    font-size: 14px;
    color: #52c41a;
    font-weight: 600;
    white-space: nowrap;
}

/* 提示框样式 */
.copy-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #52c41a;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.copy-toast.show {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 分享按钮样式 */
.share-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.share-button:hover {
    background: #fafafa;
    border-color: #ffa116;
}

.share-button svg {
    width: 20px;
    height: 20px;
    color: #595959;
}

.share-button:hover svg {
    color: #ffa116;
}

/* 禁用复选框点击 */
.problem-checkbox input[type="checkbox"] {
    pointer-events: none;
}

.problem-checkbox label {
    cursor: default;
}

        /* 语言选择器样式 */
        .language-selector {
            position: absolute;
            top: 20px;
            right: 80px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .language-selector label {
            font-size: 14px;
            color: #595959;
            font-weight: 500;
            white-space: nowrap;
        }
        
        .language-selector select {
            padding: 8px 32px 8px 12px;
            border: 1px solid #d9d9d9;
            border-radius: 6px;
            font-size: 14px;
            color: #262626;
            background-color: white;
            cursor: pointer;
            outline: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23595959' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
        }
        
        .language-selector select:hover {
            border-color: #ffa116;
        }
        
        .sidebar-tabs {
            border-bottom: 2px solid #f0f0f0;
            margin-bottom: 12px;
        }
        
        .sidebar-tab {
            flex: 1;
            padding: 12px 16px;
            text-align: center;
            font-size: 14px;
            color: #595959;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            transition: all 0.2s;
            background: none;
            border-top: none;
            border-left: none;
            border-right: none;
        }
        
        .sidebar-tab:hover {
            color: #ffa116;
        }
        
        .sidebar-tab.active {
            color: #ffa116;
            font-weight: 600;
            border-bottom-color: #ffa116;
        }
        
        /* 选项卡内容动画 */
        .course-tab-content {
            display: none;
            animation: fadeInUp 0.15s ease;
        }
        
        .course-tab-content.active {
            display: block;
        }

        .course-tab-content.fade-out {
            animation: fadeOutDown 0.15s ease forwards;
        }

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

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

        /* 题库列表样式 */
        .problem-set-list {
            list-style: none;
            padding: 0;
        }
        
        .problem-set-list li {
            padding: 12px 0;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .problem-set-list li:last-child {
            border-bottom: none;
        }
        
        .problem-set-list a {
            color: #262626;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.2s;
        }
        
        .problem-set-list a:hover {
            color: #ffa116;
        }
        
        /* 知识点列表样式 */
        .knowledge-list {
            list-style: none;
            padding: 0;
        }
        
        .knowledge-list li {
            padding: 10px 16px;
            background: #fafafa;
            border-radius: 6px;
            margin-bottom: 8px;
            font-size: 14px;
            color: #595959;
        }

.badge-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.badge-section-header .badge-title {
    margin-bottom: 0;
}


/* 编辑按钮样式 */
.edit-button {
    position: absolute;
    top: 20px;
    right: 260px;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.edit-button:hover {
    background: #fafafa;
    border-color: #ffa116;
}

.edit-button svg {
    width: 20px;
    height: 20px;
    color: #595959;
}

.edit-button:hover svg {
    color: #ffa116;
}

.problem-video-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    padding: 6px;
    background: white;
    border: 1.5px solid #e8e8e8;
    border-radius: 6px;
    color: #595959;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;  /* 移除链接下划线 */
}

.problem-video-icon:hover {
    background: #fff7e6;
    border-color: #ffa116;
    color: #ffa116;
    text-decoration: none;  /* hover时也不显示下划线 */
}

.problem-video-icon svg {
    width: 14px;
    height: 14px;
}



/* 知识点筛选卡片 */
.filter-section {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 16px;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 15px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.filter-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #8c8c8c;
    font-size: 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid #e0e0e0;
    white-space: nowrap;
}

/* ⭐ hover 状态 - 边框加深，不变橙色 */
.filter-tag:hover {
    border-color: #595959;
    background: #fafafa;
}

/* ⭐ 选中状态 - 橙色主题 */
.filter-tag.selected {
    background: #fff7e6;
    color: #ffa116;
    border-color: #ffa116;
    font-weight: 500;
}

/* ⭐ 选中状态的 hover - 橙色加深 */
.filter-tag.selected:hover {
    background: #ffe7ba;
    border-color: #ff8c00;
}

.filter-actions {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    justify-content: flex-end; /* ⭐ 靠右对齐 */
}

.filter-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px !important;
    color: #595959;
}

.filter-radio input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #ffa116;
    margin: 0; /* ⭐ 移除默认 margin */
    flex-shrink: 0; /* ⭐ 防止被压缩 */
}

.filter-radio:hover span {
    color: #ffa116;
}