/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 主容器 - 限制整个网站宽度 */
.page-wrapper {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}
/* 头部导航栏 */
.header-box {
    background-color: rgba(51, 51, 51, 0.3)!important;
    color: #fff;
    padding: 22px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

main {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 0;
}

.container {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 36px 0 46px;
    position: relative;
}

/* 通用样式 */
.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s, transform 0.8s;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #0078d7;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}


/* 搜索区域 */
.search-section {
    background-image: url('/index/img/header_bg.png');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 85px 20px 0;
    color: #fff;
    position: relative;
    margin-top: 0;

    &:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
        z-index: 1;
    }
}

.search-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-section .search-overlay {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-section .search-overlay h2 {
    font-size: 36px;
    margin-bottom: 30px;
    font-weight: normal;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search-section .search-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-section .search-box {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.search-section .search-box input {
    width: 100%;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    outline: none;
    color: #ffffff !important;
    background: transparent;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.search-section .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.search-section .search-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.search-section .search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    height: 43px;
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-section .search-btn img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    object-fit: contain;
}

.search-section .search-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
}

.search-section .ai-search-btn {
    display: flex;
    align-items: center;
    /*background-color: rgba(0, 120, 215, 0.9);*/
    background: url("/index/img/ai-bg.png") no-repeat;
    background-size: 188px 43px;
    color: #0083E0;
    border: none;
    border-radius: 4px;
    padding: 0 23px 0 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    height: 44px;
    transition: all 0.3s;
}

.search-section .ai-search-btn .ai-icon {
    height: 36px;
    margin-right: 8px;
    object-fit: cover;
}
.search-section .ai-search-btn .ai-font {
    height: 18px;
    margin-right: 8px;
    object-fit: cover;
}

.search-section .ai-search-btn:hover {
    /*background-color: rgba(0, 95, 169, 1);*/
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 资讯和统计 */
.info-stats {
    display: flex;
    justify-content: flex-end;
    padding: 16px 36px 16px 46px;

    a {
        margin-left: 20px;
        color: #666;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;

        &:hover {
            color: #0078d7;
        }

        .info-icon {
            width: 20px;
            height: 20px;
            object-fit: cover;
            border-radius: 2px;
            transition: transform 0.3s ease;
        }

        &:hover .info-icon {
            transform: scale(1.1);
        }

        span {
            font-size: 14px;
            white-space: nowrap;
        }
    }
}

/* 学科资源 */
.subject-resources {
    margin-top: 15px;
    padding: 0;
    background-color: #fff;

    .resource-layout {
        display: flex;
        flex-direction: row;
        /* gap: 20px; */
        max-width: 100%;

        @media (max-width: 992px) {
            flex-direction: column;
        }
    }

    .resource-left {
        flex: 1;
        background: url("/index/img/resource-bg.png") no-repeat;
        background-size: 100%;
        /* border-radius: 8px; */
        padding: 40px 50px;

        .section-title {
            margin-top: 0;
            margin-bottom: 30px;
            font-size: 28px;
            /* color: #0078d7; */
        }
    }

    .resource-card-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        cursor: pointer;
    }

    .resource-right {
        width: 40%;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        /* border-radius: 16px; */
        background: transparent;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);

        @media (max-width: 992px) {
            width: 100%;
            min-height: 400px;
        }
    }

    .dark-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
                135deg,
                rgba(0, 0, 0, 0.25) 0%,
                rgba(0, 0, 0, 0.4) 50%,
                rgba(0, 0, 0, 0.3) 100%
        );
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
        z-index: 1;
    }

    .right-content {
        position: relative;
        z-index: 2;
        padding: 30px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .right-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;

        &:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.1);
            z-index: 1;
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 0;
        }
    }

    .resource-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        opacity: 1;
        transform: translateY(0);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: row;
        height: 180px;
        margin-bottom: 20px;
        cursor: pointer;

        &:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }

        &.selected {
            .card-content {
                h3 {
                    color: #0078d7;
                }
            }
        }

        .card-image {
            width: 300px;
            min-width: 300px;
            height: 180px;
            background-color: #f0f0f0;
            background-size: cover;
            background-position: center;
            overflow: hidden;
            border-radius: 8px 0 0 8px;


            img {
                width: 100%;
                height: 100%;
                object-fit: fill;
                transition: transform 0.3s;
                display: block;
            }

            &:hover img {
                transform: scale(1.05);
            }
        }

        .card-content {
            padding: 10px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            justify-content: flex-start;

            .update-time {
                color: #999;
                font-size: 12px;
                margin-bottom: 10px;
                text-align: left;
            }

            h3 {
                font-size: 20px;
                margin-bottom: 10px;
                color: #333;
                white-space: nowrap;
                overflow: visible;
                text-align: left;
                font-weight: bold;
                line-height: 1.2;
                transition: color 0.3s ease;
            }

            p {
                color: #666;
                margin-bottom: 6px;
                font-size: 14px;
                line-height: 1.5;
                display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: left;
            }
        }

        .card-footer {
            padding: 5px 8px;
            color: #777;
            display: flex;
            flex-direction: column;
            gap: 1px;
            background-color: #fff;
            border-top: 1px solid rgba(0,0,0,0.03);

            .footer-item {
                display: flex;
                align-items: center;
                gap: 3px;
                line-height: 1;
                padding: 1px 0;
                text-align: center;

                .footer-icon {
                    width: 12px;
                    height: 12px;
                    opacity: 0.65;
                    flex-shrink: 0;
                    position: relative;
                    top: 0;
                }

                span {
                    flex: 1;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    letter-spacing: -0.1px;
                }
            }
        }
    }

    /* 响应式适配 */
    @media (max-width: 768px) {
        .resource-card {
            flex-direction: column;
            height: auto;

            .card-image {
                width: 100%;
                height: 180px;
                border-radius: 8px 8px 0 0;

                img {
                    object-fit: fill;
                }
            }

            .card-content {
                padding: 20px;

                p {
                    -webkit-line-clamp: 4;
                    max-height: none;
                }
            }
        }
    }

    .small-title {
        font-size: 28px;
        margin-bottom: 25px;
        color: #fff;
        font-weight: bold;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6),
        0 1px 3px rgba(0, 0, 0, 0.8);
        text-align: left;
        letter-spacing: 1px;
        background-color: rgba(255, 255, 255, 0.1);
        padding: 18px 30px;
        border-radius: 12px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.15);
        display: inline-block;
        transition: all 0.3s ease;
    }

    .content-panel {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }

    .grade-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 15px;
        margin-bottom: 25px;
        max-width: 560px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .grade-btn {
        display: block;
        padding: 18px 30px;
        background-color: rgba(255, 255, 255, 0.01);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 12px;
        text-align: center;
        transition: all 0.2s ease;
        font-size: 18px;
        font-weight: 500;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.15);
        cursor: pointer;
        margin-top: 45px;

        &:hover {
            background-color: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
        }

        &:active {
            background-color: rgba(255, 255, 255, 0.25);
            transform: translateY(0px) scale(0.98);
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
            transition: all 0.1s ease;
        }
    }

    .featured-content {
        margin-top: auto;
        background-color: rgba(255, 255, 255, 0.15);
        padding: 24px;
        border-radius: 16px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: all 0.2s ease;

        .update-info {
            color: #e0e0e0;
            margin-bottom: 8px;
            font-size: 13px;
        }

        h3 {
            font-size: 20px;
            color: #fff;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .arrow-icon {
                font-size: 24px;
                color: #fff;
                transition: transform 0.3s;
            }
        }

        &:hover {
            background-color: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);

            h3 .arrow-icon {
                transform: translateX(3px);
            }
        }

        &:active {
            background-color: rgba(255, 255, 255, 0.25);
            transform: translateY(0px) scale(0.98);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
            transition: all 0.1s ease;
        }

        .author-info {
            color: #e0e0e0;
            font-size: 13px;
            margin-top: 5px;

            span {
                color: #e0e0e0;
            }
        }
    }
}

/* 地方资源 */
.local-resources {
    padding: 40px 36px 40px 46px;
    background-color: #fff;

    .resource-gallery {
        display: flex;
        justify-content: space-between;
        gap: 15px;
        padding: 10px;
        overflow: visible;

        /* 当有item被hover时，其他item被压缩 */
        &:hover .gallery-item:not(:hover) {
            flex: 0.8;
            opacity: 0.85;
            filter: brightness(0.9);
            transform: scale(0.98);
        }

        @media (max-width: 992px) {
            flex-wrap: wrap;

            .gallery-item {
                flex-basis: calc(50% - 15px);
            }

            /* 响应式下关闭压缩效果 */
            &:hover .gallery-item:not(:hover) {
                flex: 1;
                opacity: 1;
                filter: none;
            }
        }

        @media (max-width: 576px) {
            flex-direction: column;

            .gallery-item {
                flex-basis: 100%;
            }
        }
    }

    .gallery-item {
        flex: 1;
        height: 200px;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
        background-color: transparent;
        opacity: 1;
        transform: translateY(0);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        cursor: pointer;

        /* 默认展开状态 */
        &.expanded {
            flex: 1.3;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            border-radius: 15px;
            z-index: 10;

            .gallery-image img {
                transform: none;
                object-fit: fill;
            }

            .gallery-content {
                padding: 15px 25px;
                background-color: rgba(0, 0, 0, 0.4);
                backdrop-filter: blur(8px);
                -webkit-backdrop-filter: blur(8px);

                h3 {
                    font-size: 18px;
                    margin-bottom: 8px;
                    white-space: normal;
                    overflow: visible;
                    text-overflow: initial;
                    text-align: left;
                    opacity: 0.95;
                }

                .description {
                    display: block;
                    font-size: 13px;
                    line-height: 1.4;
                    margin-bottom: 8px;
                    opacity: 0.85;
                    color: #fff;
                }

                .view-count {
                    font-size: 14px;
                    opacity: 0.85;
                    text-align: left;
                }
            }

            .arrow-icon {
                bottom: 20px;
                right: 20px;
                width: 36px;
                height: 36px;
                background-color: rgba(255, 255, 255, 0.4);
                opacity: 1;
                transform: scale(1.15);

                i {
                    font-size: 24px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    text-align: center;
                    transform: translate(1px, -2px);
                }
            }
        }

        /* 默认hover效果 - 居中拉伸 */
        &:hover {
            flex: 1.3;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            border-radius: 15px;
            z-index: 10;

            .gallery-image img {
                transform: none;
                object-fit: fill;
            }

            .gallery-content {
                padding: 15px 25px;
                background-color: rgba(0, 0, 0, 0.4);
                backdrop-filter: blur(8px);
                -webkit-backdrop-filter: blur(8px);

                h3 {
                    font-size: 18px;
                    margin-bottom: 8px;
                    white-space: normal;
                    overflow: visible;
                    text-overflow: initial;
                    text-align: left;
                    opacity: 0.95;
                }

                .description {
                    display: block;
                    font-size: 13px;
                    line-height: 1.4;
                    margin-bottom: 8px;
                    opacity: 0.85;
                    color: #fff;
                }

                .view-count {
                    font-size: 14px;
                    opacity: 0.85;
                    text-align: left;
                }
            }

            .arrow-icon {
                bottom: 20px;
                right: 20px;
                width: 38px;
                height: 38px;
                background-color: rgba(255, 255, 255, 0.45);
                opacity: 1;
                transform: scale(1.2);

                i {
                    font-size: 26px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    text-align: center;
                    transform: translate(1px, -2px);
                    height: 100%;
                    width: 100%;
                }
            }
        }

        .gallery-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            overflow: hidden;
            border-radius: inherit;

            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
                object-position: center;
                transition: none;
                transform: none;
                object-fit: fill;
            }
        }

        &:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(102, 100, 100, 0.15) 100%);
            z-index: 2;
            pointer-events: none;
        }

        .gallery-content {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 12px 10px;
            color: #fff;
            z-index: 3;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            background-color: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border-top: 1px solid rgba(255, 255, 255, 0.1);

            h3 {
                font-size: 16px;
                margin-bottom: 6px;
                text-shadow: 0 1px 3px rgba(0,0,0,0.5);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: center;
                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            }

            .description {
                display: none;
                font-size: 13px;
                line-height: 1.4;
                margin-bottom: 8px;
                opacity: 0.85;
                color: #fff;
                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            }

            .view-count {
                font-size: 12px;
                opacity: 0.8;
                text-align: center;
                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            }
        }

        .arrow-icon {
            position: absolute;
            bottom: 18px;
            right: 18px;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 4;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            opacity: 0.9;

            i {
                font-size: 20px;
                font-style: normal;
                line-height: 1;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                text-align: center;
                transform: translate(1px, -2px);
                height: 100%;
                width: 100%;
            }
        }

        /* 第一个item - 向右拉伸 */
        &:first-child:hover {
            /* 只进行左右拉伸，无需额外变换 */
        }

        /* 最后一个item - 向左拉伸 */
        &:last-child:hover {
            /* 只进行左右拉伸，无需额外变换 */
        }

        /* 触摸时的挤压效果 */
        &:active {
            transform: scale(0.95) translateY(3px);
            height: 180px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            transition: all 0.2s ease;

            .gallery-content {
                padding: 6px;

                h3 {
                    font-size: 16px;
                    margin-bottom: 6px;
                }

                .view-count {
                    font-size: 12px;
                }
            }

            .arrow-icon {
                bottom: 15px;
                right: 15px;
                width: 26px;
                height: 26px;

                i {
                    font-size: 20px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    text-align: center;
                    transform: translate(1px, -2px);
                    height: 100%;
                    width: 100%;
                }
            }
        }
    }


}

/* 学问通 */
.study-channel {
    padding: 40px 36px 40px 46px;
    background-color: #fff;

    /* .section-title {
        padding-left: 15px;
    } */

    .level-tabs {
        display: flex;
        margin-bottom: 40px;
        border-bottom: none;
        gap: 30px;
        justify-content: flex-start;
        padding-left: 15px;

        .level-tab {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 0 20px;
            position: relative;
            margin-right: 0;
            width: 220px;
            height: 70px;
            min-width: 220px;
            max-width: 220px;
            min-height: 70px;
            max-height: 70px;
            border: none;
            border-radius: 30px;
            text-decoration: none;
            transition: background-image 0.4s ease;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            overflow: hidden;
            cursor: pointer;
            transform: none !important;

            /* 默认背景图片 */
            &:nth-child(1) {
                background-image: url('/index/img/course11.png');
            }

            &:nth-child(2) {
                background-image: url('/index/img/course21.png');
            }

            &:nth-child(3) {
                background-image: url('/index/img/course31.png');
            }

            /* 激活状态背景图片 */
            &.active:nth-child(1) {
                background-image: url('/index/img/course12.png') !important;
            }

            &.active:nth-child(2) {
                background-image: url('/index/img/course22.png') !important;
            }

            &.active:nth-child(3) {
                background-image: url('/index/img/course32.png') !important;
            }

            /* 添加遮罩层以提高文字可读性 */
            &:before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(255, 255, 255, 0.1);
                transition: all 0.4s ease;
                z-index: 1;
            }

            &.active:before {
                /* background: rgba(0, 0, 0, 0.2); */
            }



            span {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                transition: color 0.4s ease;
                text-align: center;
                position: relative;
                z-index: 2;
                text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
            }

            &.active {
                span {
                    color: #fff;
                    font-weight: 700;
                    /* text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); */
                }
            }

            &:hover {
                /* 只改变遮罩层，不改变尺寸 */
                &:before {
                    background: rgba(255, 255, 255, 0.15);
                }
            }

            &.active:hover {
                &:before {
                    /* background: rgba(0, 0, 0, 0.15); */
                }
            }

            &:not(.active):hover {
                span {
                    color: #0078d7;
                    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
                }
            }

            /* 触摸点击效果 - 移除变形效果 */
            &:active {
                /* 移除所有变形效果，保持椭圆图片不变形 */
            }
        }
    }

    @media (max-width: 768px) {
        .level-tabs {
            flex-wrap: wrap;
            justify-content: flex-start;

            .level-tab {
                width: 160px;
                margin-bottom: 10px;
            }
        }
    }

    @media (max-width: 576px) {
        .level-tabs {
            .level-tab {
                width: 140px;

                .tab-icon img {
                    height: 40px;
                }

                span {
                    font-size: 14px;
                }
            }
        }
    }

    .course-cards {
        display: grid;
            grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        width: 100%;

        @media (max-width: 768px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width: 576px) {
            grid-template-columns: 1fr;
        }
    }

    .course-cards-container {
        position: relative;
        display: flex;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        height: 60px;
        background: rgba(151, 169, 218, 0.95);
        border: none;
        color: #ffffff;
        font-size: 32px;
        font-weight: bold;
        cursor: pointer;
        z-index: 10;
        transition: all 0.3s ease;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;

        &:hover {
            background: #0078d7;
            color: white;
            transform: translateY(-50%) scale(1.15);
            box-shadow: 0 12px 35px rgba(0, 120, 215, 0.3);
        }

        &:active {
            transform: translateY(-50%) scale(0.9);
        }

        i {
            font-style: normal;
            line-height: 1;
            font-weight: 900;
        }
    }



    .nav-arrow-right {
        right: 15px;
        min-height: 200px;

        i {
            margin-left: 3px;
        }
    }

    @media (max-width: 768px) {
        .nav-arrow {
            width: 50px;
            height: 50px;
            font-size: 26px;
        }

        .nav-arrow-right {
            right: 10px;
        }
    }

    @media (max-width: 576px) {
        .nav-arrow {
            width: 45px;
            height: 45px;
            font-size: 24px;
        }

        .nav-arrow-right {
            right: 5px;
        }
    }

    .course-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        opacity: 1;
        transform: translateY(0);
        transition: transform 0.3s, box-shadow 0.3s;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
        cursor: pointer;

        &:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            transform: translateY(-8px);
        }

        .card-image {
            height: 150px;
            background-color: #f0f0f0;
            overflow: hidden;
            position: relative;
            cursor: pointer;

            &:before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
                z-index: 1;
                transition: background 0.3s ease;
            }

            &:hover:before {
                background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
            }

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 0.4s ease;
                transform: scale(1.05);
            }

            &:hover img {
                transform: scale(1.15);
            }

            &:hover .video-play-btn {
                opacity: 1;
                visibility: visible;
            }

            .video-play-btn {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 60px;
                height: 60px;
                background: rgba(255, 255, 255, 0.9);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 2;
                transition: all 0.3s ease;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
                cursor: pointer;
                opacity: 0;
                visibility: hidden;

                .play-icon {
                    font-size: 24px;
                    color: #0078d7;
                    margin-left: 3px;
                    transition: all 0.3s ease;
                }

                &:hover {
                    background: rgba(255, 255, 255, 1);
                    transform: translate(-50%, -50%) scale(1.1);
                    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);

                    .play-icon {
                        color: #005a9e;
                        transform: scale(1.2);
                    }
                }

                &.playing {
                    animation: playButtonPulse 0.3s ease-out;

                    .play-icon {
                        animation: playIconSpin 0.3s ease-out;
                    }
                }
            }

            .card-title {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                padding: 10px 5px;
                z-index: 3;
                background-color: rgba(0, 0, 0, 0.2);
                backdrop-filter: blur(5px);
                -webkit-backdrop-filter: blur(5px);
                border-top: 1px solid rgba(255, 255, 255, 0.1);
                transition: all 0.3s ease;

                h3 {
                    margin: 0;
                    padding: 0;
                    font-size: 14px;
                    font-weight: 500;
                    color: #fff;
                    border: none;
                    line-height: 1.4;
                    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
                    overflow: visible;
                    white-space: nowrap;
                    text-align: left;
                    transition: all 0.3s ease;
                }
            }

            &:hover .card-title {
                background-color: rgba(0, 0, 0, 0.4);

                h3 {
                    font-weight: 600;
                    color: #ffffff;
                    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
                    transform: translateY(-2px);
                }
            }


        }

        /* Card footer styles moved below */
    }


}

/* 最新活动和专题 */
.activities-topics {
    padding: 40px 36px 40px 46px;
    background-color: #fff;

    .container {
        display: flex;
        justify-content: space-between;
        gap: 30px;

        @media (max-width: 992px) {
            flex-direction: column;
        }
    }

    .activities {
        width: 60%;

        @media (max-width: 992px) {
            width: 100%;
        }

        /* 已移除冲突的activity-card样式规则 */
    }

    .topics {
        width: 40%;
        height: 100%;
        display: flex;
        flex-direction: column;

        @media (max-width: 992px) {
            width: 100%;
        }
    }
}

.topics .topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 0;
    margin-bottom: 20px;

    @media (max-width: 576px) {
        grid-template-columns: 1fr;
    }
}

.topics .topic-grid .topic-item {
    height: 90px;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;

    &:hover {
        transform: translateY(0);
        box-shadow: none;

        .topic-image img {
            transform: scale(1.0);
        }
    }



    .topic-name {
        position: relative;
        z-index: 2;
        font-size: 18px;
        font-weight: bold;
        color: #333;
        width: 100%;
        padding: 0 10px;
        white-space: nowrap;
        overflow: visible;
        text-align: center;
    }

    .topic-image {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        overflow: hidden;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: none;
            object-fit: fill;
        }
    }

    &.topic-left, &.topic-right {
        .topic-name {
            text-align: center;
            width: 100%;
            padding: 0 15px;
        }

        .topic-image {
            justify-content: center;
        }
    }

    @media (max-width: 768px) {
        height: 80px;

        .topic-name {
            font-size: 16px;
            padding: 0 15px;
        }
    }
}

/* 专题卡片交互状态 */
.topics .topic-grid .topic-item:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.topics .topic-grid .topic-item:focus,
.topics .topic-grid .topic-item:visited {
    outline: none;
    box-shadow: none;
    transform: translateY(0);
    background: none;
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

.topics .topic-grid .topic-item:focus-visible {
    outline: 2px solid #0078d7;
    outline-offset: 2px;
}

/* 专题卡片触摸状态类 */
.topics .topic-grid .topic-item.topic-pressed {
    transform: translateY(3px) scale(0.96) !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.1s ease !important;
}

/* 专题卡片悬停效果 - 用于测试 */
.topics .topic-grid .topic-item:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.topics .statistics .stats-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;

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



.statistics {
    margin-top: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.statistics .section-title {
    margin-bottom: 15px;
}

.statistics .stats-info {
    background-color: #f8f8f8;
    border-radius: 10px;
    text-align: center;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    height: 120px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.statistics .stats-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.statistics p {
    font-size: 18px;
    color: #333;
    text-align: center;
}

.statistics .stat-number {
    color: #0078d7;
    font-weight: bold;
    font-size: 22px;
    margin: 0 5px;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 0;
    width: 100%;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* max-width: 1200px; */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .footer .container {
        flex-direction: column;
        gap: 20px;
    }
}

.footer .copyright p {
    margin-bottom: 5px;
    font-size: 14px;
    color: #ccc;
    margin: 0 40px;
    a {
        color: #ccc;
        &:hover {
            color: #0078d7;
        }
    }
}

.footer .login-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 40px;
}

.footer .login-links .login-link {
    color: #ccc;
    font-size: 14px;
}

.footer .login-links .login-link:hover {
    color: #fff;
}

/* 响应式导航栏切换按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;

    @media (max-width: 992px) {
        display: block;
        font-size: 24px;
        color: #fff;
    }
}

/* 响应式样式 */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .subject-resources .resource-layout {
        gap: 15px;
    }

    .subject-resources .resource-right {
        width: 45%;
    }
}

@media (max-width: 992px) {
    .subject-resources .resource-layout {
        flex-direction: column;
        gap: 25px;
    }

    .subject-resources .resource-left,
    .subject-resources .resource-right {
        width: 100%;
    }

    .subject-resources .resource-right {
        min-height: 300px;
    }

    .study-channel .course-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
    }

    .study-channel .level-tabs {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;

        .level-tab {
            width: 180px;
            height: 60px;
            min-width: 180px;
            max-width: 180px;
            min-height: 60px;
            max-height: 60px;
        }
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    .search-section {
        height: 450px;
        padding: 70px 15px 0;

        .search-overlay h2 {
            font-size: 26px;
            margin-bottom: 20px;
        }

        .search-container {
            max-width: 95%;
        }

        .search-buttons {
            flex-direction: column;
            gap: 12px;

            .search-btn, .ai-search-btn {
                width: 100%;
                justify-content: center;
                height: 44px;
                font-size: 15px;
            }
        }
    }

    .info-stats {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        padding: 12px 15px;

        a {
            margin-left: 0;
            font-size: 13px;
        }
    }

    .subject-resources .resource-card {
        flex-direction: column;
        height: auto;
        margin-bottom: 15px;

        .card-image {
            width: 100%;
            height: 200px;
            border-radius: 8px 8px 0 0;
        }

        .card-content {
            padding: 15px;

            h3 {
                font-size: 18px;
                white-space: normal;
                overflow: visible;
            }

            p {
                -webkit-line-clamp: 3;
            }
        }
    }

    .local-resources .resource-gallery {
        flex-direction: column;
        gap: 15px;

        .gallery-item {
            height: 180px;

            &:hover {
                flex: 1;
                transform: translateY(-5px);
            }
        }

        /* 关闭平板端的压缩效果 */
        &:hover .gallery-item:not(:hover) {
            flex: 1;
            opacity: 1;
            filter: none;
            transform: none;
        }
    }

    .study-channel .course-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }

    .study-channel .level-tabs {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        padding-left: 15px;

        .level-tab {
            width: 160px;
            height: 55px;
            min-width: 160px;
            max-width: 160px;
            min-height: 55px;
            max-height: 55px;

            span {
                font-size: 15px;
            }
        }
    }

    .study-channel .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 26px;
    }

    .activities-topics .container {
        gap: 25px;
    }

    .activity-cards-container {
        height: 300px;
    }

    .activities .activity-card {
        .activity-image .image-title {
            font-size: 18px;
            bottom: 50px;
        }

        .activity-image .join-btn {
            height: 50px;
            font-size: 16px;

            .btn-text {
                height: 50px;
                padding: 0 20px;
            }

            .arrow-icon {
                width: 50px;
                height: 50px;

                img {
                    width: 50px;
                    height: 50px;
                }
            }
        }
    }

    .topics .topic-grid .topic-item {
        height: 80px;

        .topic-name {
            font-size: 16px;
        }
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    .search-section {
        height: 380px;
        padding: 60px 12px 0;

        .search-overlay {
            h2 {
                font-size: 20px;
                margin-bottom: 15px;
            }
        }

        .search-container {
            max-width: 100%;
        }

        .search-box {
            margin-bottom: 12px;

            input {
                padding: 12px 15px;
                font-size: 14px;
            }
        }

        .search-buttons {
            gap: 10px;

            .search-btn, .ai-search-btn {
                padding: 10px 15px;
                font-size: 14px;
                height: 40px;
            }

            .search-btn img {
                width: 16px;
                height: 16px;
                margin-right: 5px;
            }

            .ai-search-btn .ai-icon {
                width: 18px;
                height: 18px;
                margin-right: 6px;
            }
        }
    }

    .info-stats {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 10px 12px;

        a {
            font-size: 12px;

            .info-icon {
                width: 18px;
                height: 18px;
            }
        }
    }

    .subject-resources .resource-left {
        padding: 15px;

        .section-title {
            font-size: 24px;
            margin-bottom: 20px;
        }

        .grade-buttons {
            grid-template-columns: 1fr;
            gap: 12px;

            .grade-btn {
                padding: 15px 20px;
                font-size: 16px;
                margin-top: 15px;
            }
        }
    }

    .subject-resources .resource-right {
        min-height: 250px;

        .right-content {
            padding: 20px;
        }

        .small-title {
            font-size: 22px;
            padding: 15px 20px;
            margin-bottom: 20px;
        }

        .featured-content {
            padding: 18px;

            h3 {
                font-size: 18px;
            }
        }
    }

    .subject-resources .resource-card {
        margin-bottom: 12px;

        .card-image {
            height: 160px;
        }

        .card-content {
            padding: 12px;

            h3 {
                font-size: 16px;
                margin-bottom: 8px;
            }

            p {
                font-size: 13px;
                -webkit-line-clamp: 2;
            }

            .update-time {
                font-size: 11px;
                margin-bottom: 8px;
            }
        }
    }

    .local-resources {
        padding: 30px 0;

        .resource-gallery {
            gap: 12px;
            padding: 5px;

            .gallery-item {
                height: 160px;
                border-radius: 6px;

                .gallery-content {
                    padding: 10px 8px;

                    h3 {
                        font-size: 14px;
                        margin-bottom: 4px;
                    }

                    .view-count {
                        font-size: 11px;
                    }
                }

                .arrow-icon {
                    width: 24px;
                    height: 24px;
                    bottom: 15px;
                    right: 15px;

                    i {
                        font-size: 16px;
                    }
                }
            }
        }
    }

    .study-channel {
        padding: 30px 0;

        .level-tabs {
            gap: 8px;
            padding-left: 12px;

            .level-tab {
                width: 140px;
                height: 50px;
                min-width: 140px;
                max-width: 140px;
                min-height: 50px;
                max-height: 50px;

                span {
                    font-size: 14px;
                }
            }
        }

        .course-cards {
            grid-template-columns: 1fr;
            gap: 15px;
            width: 100%;
        }

        .nav-arrow {
            width: 45px;
            height: 45px;
            font-size: 20px;
        }

        .nav-arrow-right {
            right: 5px;
        }
    }

    .activities-topics {
        padding: 30px 0;

        .container {
            gap: 20px;
        }

        .activity-cards-container {
            height: 250px;
        }

        .activities .activity-card {
            .activity-image .image-title {
                font-size: 16px;
                bottom: 45px;
                left: 15px;
                right: 15px;
            }

            .activity-image .date-overlay {
                left: 15px;
                top: 15px;

                .date {
                    font-size: 12px;
                }
            }

            .activity-image .join-btn {
                height: 45px;
                font-size: 14px;
                right: 15px;
                bottom: 15px;

                .btn-text {
                    height: 45px;
                    padding: 0 15px;
                }

                .arrow-icon {
                    width: 45px;
                    height: 45px;

                    img {
                        width: 45px;
                        height: 45px;
                    }
                }
            }
        }
    }

    .topics .topic-grid {
        grid-template-columns: 1fr;
        gap: 10px;

        .topic-item {
            height: 70px;

            .topic-name {
                font-size: 14px;
                padding: 0 12px;
            }
        }
    }

    .statistics {
        margin-top: 15px;

        .stats-info {
            height: 100px;

            p {
                font-size: 16px;
            }

            .stat-number {
                font-size: 20px;
            }
        }
    }
}

/* CSS动画效果 */
.resource-card, .gallery-item, .course-card, .topic-item {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item .arrow-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .arrow-icon {
    transform: translateX(8px) scale(1.3);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.4);
}

.gallery-item:hover .arrow-icon i {
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    transform: translate(1px, -2px);
    height: 100%;
    width: 100%;
}

.featured-content h3 .arrow-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-content:hover h3 .arrow-icon {
    transform: translateX(8px) scale(1.3);
}

/* 图片延迟加载 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

img:not(.lazy-load) {
    opacity: 1;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

/* 卡片底部样式 - 添加高优先级选择器 */
.study-channel .course-cards .course-card .card-footer {
    padding: 13px 15px !important;
    font-size: 9px !important;
    color: #777 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    background-color: #fff !important;
    border-top: 1px solid rgba(0,0,0,0.03) !important;
    transition: all 0.3s ease !important;
}

.study-channel .course-cards .course-card:hover .card-footer {
    background-color: #f9f9f9 !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}

.study-channel .course-cards .course-card .card-footer .footer-item {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    line-height: 1 !important;
    padding: 1px 0 !important;
    transition: all 0.3s ease !important;
}

.study-channel .course-cards .course-card:hover .card-footer .footer-item {
    color: #555 !important;
}

.study-channel .course-cards .course-card .card-footer .footer-item .footer-icon {
    width: 20px !important;
    height: 20px !important;
    opacity: 0.65 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    top: 0 !important;
    margin-right: 2px !important;
    transition: opacity 0.3s ease !important;
}

.study-channel .course-cards .course-card:hover .card-footer .footer-item .footer-icon {
    opacity: 0.8 !important;
}

.study-channel .course-cards .course-card .card-footer .footer-item span {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.1px !important;
    font-size: 12px !important;
    transition: all 0.3s ease !important;
}

.study-channel .course-cards .course-card:hover .card-footer .footer-item span {
    color: #333 !important;
    font-weight: 500 !important;
}

/* 活动轮播样式 */
.activities-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.activity-cards-container {
    position: relative;
    width: 100%;
    height: 380px;
}

/* 活动卡片样式优化 */
.activities .activity-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    visibility: hidden;
}

.activities .activity-card.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    z-index: 2;
    visibility: visible !important;
}

.activities .activity-card.prev {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.activities .activity-card.next {
    transform: translateX(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.activities .activity-card .activity-image {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    overflow: hidden;
    position: relative;
    cursor: pointer;

    &:before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 70%;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
        z-index: 1;
        pointer-events: none;
    }

    img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.3s ease;
        object-fit: fill;
    }

    &:hover img {
        transform: scale(1.05);
    }
}

.activities .activity-card .activity-image .image-title {
    position: absolute;
    left: 20px;
    bottom: 60px;
    right: 20px;
    color: #fff;
    font-size: 20px;
    line-height: 1.4;
    z-index: 2;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: normal;
    text-align: left;
}

.activities .activity-card .activity-image .activity-info {
    position: absolute;
    left: 20px;
    bottom: 80px;
    right: 20px;
    z-index: 2;
    color: #fff;
}

.activities .activity-card .activity-image .activity-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.activities .activity-card .activity-image .activity-date {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.activities .activity-card .activity-image .date-overlay {
    position: absolute;
    left: 20px;
    top: 20px;
    padding: 5px;
    z-index: 2;

    .date {
        color: #fff;
        font-size: 14px;
        line-height: 1.2;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        font-weight: 300;
    }
}

.activities .activity-card .activity-image .join-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: stretch;
    padding: 0;
    margin: 0;
    background-color: transparent;
    color: #fff;
    z-index: 3;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    height: 60px;
    text-decoration: none;
    border: none;
    outline: none;
    overflow: hidden;
    border-radius: 0;
}

.activities .activity-card .activity-image .join-btn .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    transition: all 0.3s ease;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    margin: 0;
    position: relative;
    z-index: 1;
}

.activities .activity-card .activity-image .join-btn .arrow-icon {
    margin: 0;
    padding: 0;
    width: 60px;
    height: 60px;
    background-color: #2c9fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.activities .activity-card .activity-image .join-btn .arrow-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
}

.activities .activity-card .activity-image .join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.activities .activity-card .activity-image .join-btn:hover .btn-text {
    background-color: rgba(255, 255, 255, 0.35);
}

.activities .activity-card .activity-image .join-btn:hover .arrow-icon {
    background-color: #2c9fff;
}

.activities .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;

    a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid #e0e0e0;
        color: #666;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

        &.active {
            background-color: #0078d7;
            color: #fff;
            border-color: #0078d7;
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
            animation: paginationPulse 0.3s ease-out;
        }

        &:hover:not(.active) {
            background-color: #f8f9fa;
            border-color: #0078d7;
            transform: scale(1.05);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
        }

        &.prev-page, &.next-page {
            position: relative;
            background-color: #f8f9fa;

            &:before {
                content: '';
                width: 8px;
                height: 8px;
                border-top: 2px solid #666;
                border-left: 2px solid #666;
                display: block;
                transition: all 0.3s;
            }

            &:hover:before {
                border-color: #0078d7;
            }

            &.disabled {
                opacity: 0.4;
                cursor: not-allowed;

                &:hover {
                    transform: none;
                    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                }

                &:hover:before {
                    border-color: #666;
                }
            }
        }

        &.prev-page:before {
            transform: rotate(-45deg);
        }

        &.next-page:before {
            transform: rotate(135deg);
        }
    }
}

/* 超小屏幕优化 (480px及以下) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .search-section {
        height: 350px;
        padding: 50px 10px 0;

        .search-overlay h2 {
            font-size: 18px;
            margin-bottom: 12px;
        }

        .search-box input {
            padding: 10px 12px;
            font-size: 13px;
        }

        .search-buttons {
            .search-btn, .ai-search-btn {
                padding: 8px 12px;
                font-size: 13px;
                height: 36px;
            }
        }
    }

    .subject-resources .resource-left {
        padding: 12px;

        .section-title {
            font-size: 20px;
        }

        .grade-buttons .grade-btn {
            padding: 12px 16px;
            font-size: 15px;
            margin-top: 10px;
        }
    }

    .subject-resources .resource-right {
        .right-content {
            padding: 15px;
        }

        .small-title {
            font-size: 20px;
            padding: 12px 16px;
            margin-bottom: 15px;
        }

        .featured-content {
            padding: 15px;

            h3 {
                font-size: 16px;
            }
        }
    }

    .subject-resources .resource-card {
        .card-image {
            height: 140px;
        }

        .card-content {
            padding: 10px;

            h3 {
                font-size: 15px;
                margin-bottom: 6px;
            }

            p {
                font-size: 12px;
            }
        }
    }

    .local-resources .resource-gallery {
        .gallery-item {
            height: 140px;

            .gallery-content {
                padding: 8px 6px;

                h3 {
                    font-size: 13px;
                }

                .view-count {
                    font-size: 10px;
                }
            }

            .arrow-icon {
                width: 20px;
                height: 20px;
                bottom: 12px;
                right: 12px;
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

                i {
                    font-size: 14px;
                    transition: all 0.3s ease;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    text-align: center;
                    transform: translate(1px, -1px);
                    height: 100%;
                    width: 100%;
                }
            }

            &:hover .arrow-icon {
                width: 28px;
                height: 28px;
                transform: scale(1.25);
                background-color: rgba(255, 255, 255, 0.5);

                i {
                    font-size: 18px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    text-align: center;
                    transform: translate(1px, -1px);
                    height: 100%;
                    width: 100%;
                }
            }
        }
    }

    .study-channel .level-tabs {
        flex-direction: column;
        align-items: center;
        gap: 6px;

        .level-tab {
            width: 280px;
            height: 45px;
            min-width: 280px;
            max-width: 280px;
            min-height: 45px;
            max-height: 45px;

            span {
                font-size: 13px;
            }
        }
    }

    .study-channel .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .activities-carousel {
        margin-bottom: 15px;
    }

    .activity-cards-container {
        height: 220px;
    }

    .activities .activity-card {
        .activity-image .activity-info {
            bottom: 55px;
            left: 12px;
            right: 12px;
        }

        .activity-image .activity-title {
            font-size: 16px;
            margin-bottom: 5px;
            line-height: 1.2;
        }

        .activity-image .activity-date {
            font-size: 12px;
        }

        .activity-image .image-title {
            font-size: 14px;
            bottom: 40px;
            left: 12px;
            right: 12px;
        }

        .activity-image .date-overlay {
            left: 12px;
            top: 12px;

            .date {
                font-size: 11px;
            }
        }

        .activity-image .join-btn {
            height: 40px;
            font-size: 13px;
            right: 12px;
            bottom: 12px;

            .btn-text {
                height: 40px;
                padding: 0 12px;
            }

            .arrow-icon {
                width: 40px;
                height: 40px;

                img {
                    width: 40px;
                    height: 40px;
                }
            }
        }
    }

    .activities .pagination {
        gap: 8px;
        margin-top: 15px;

        a {
            width: 35px;
            height: 35px;
            font-size: 14px;
        }
    }

    .topics .topic-grid .topic-item {
        height: 60px;

        .topic-name {
            font-size: 13px;
            padding: 0 10px;
        }
    }

    .footer .container {
        padding: 0 10px;

        .copyright p {
            font-size: 12px;
            margin: 0 20px;
        }

        .login-links {
            margin: 0 20px;

            .login-link {
                font-size: 12px;
            }
        }
    }
}

/* 视频播放按钮动画效果 */
@keyframes playButtonPulse {
    0% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 8px 25px rgba(0, 120, 215, 0.4);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes playIconSpin {
    0% {
        transform: scale(1.2) rotate(0deg);
    }
    50% {
        transform: scale(1.4) rotate(180deg);
    }
    100% {
        transform: scale(1.2) rotate(360deg);
    }
}

/* 活动卡片切换动画 */
@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutToRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 分页按钮激活动画 */
@keyframes paginationPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 120, 215, 0.4);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
    }
}

/* 横屏模式优化 */
@media (max-width: 992px) and (orientation: landscape) {
    .search-section {
        height: 300px !important;
        padding-top: 40px !important;

        .search-overlay h2 {
            font-size: 24px;
            margin-bottom: 15px;
        }
    }

    .activity-cards-container {
        height: 200px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .gallery-item {
        /* 触摸设备上始终显示完整内容 */
        .gallery-content {
            padding: 15px 25px !important;
            background-color: rgba(0, 0, 0, 0.4) !important;
            backdrop-filter: blur(8px) !important;
            -webkit-backdrop-filter: blur(8px) !important;

            h3 {
                font-size: 18px !important;
                margin-bottom: 8px !important;
                white-space: normal !important;
                overflow: visible !important;
                text-overflow: initial !important;
                text-align: left !important;
                opacity: 0.95 !important;
            }

            .description {
                display: block !important;
                font-size: 13px !important;
                line-height: 1.4 !important;
                margin-bottom: 8px !important;
                opacity: 0.85 !important;
                color: #fff !important;
            }

            .view-count {
                font-size: 14px !important;
                opacity: 0.85 !important;
                text-align: left !important;
            }
        }

        .arrow-icon {
            bottom: 20px !important;
            right: 20px !important;
            width: 36px !important;
            height: 36px !important;
            background-color: rgba(255, 255, 255, 0.4) !important;
            opacity: 1 !important;
            transform: scale(1.15) !important;

            i {
                font-size: 24px !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                line-height: 1 !important;
                text-align: center !important;
                transform: translate(1px, -2px) !important;
                height: 100% !important;
                width: 100% !important;
            }
        }
    }

    /* 触摸设备上增大可点击区域 */
    .btn, .level-tab, .grade-btn, .topic-item {
        min-height: 44px;
        min-width: 44px;
    }

    /* 触摸设备资源卡片优化 */
    .resource-card {
        -webkit-tap-highlight-color: rgba(0, 120, 215, 0.2) !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        touch-action: manipulation !important;
        transition: all 0.2s ease;
        min-height: 44px;
        cursor: pointer;

        &:active {
            transform: scale(0.98);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        }

        &.selected {
            transform: scale(1.02);
            box-shadow: 0 8px 25px rgba(0, 120, 215, 0.3);
        }
    }

    /* 触摸设备专题卡片优化 */
    .topic-item {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }

    .topic-item:active {
        transform: translateY(3px) scale(0.96) !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
        transition: all 0.1s ease !important;
    }

    /* 触摸设备活动卡片优化 */
    .activities .pagination a {
        min-height: 44px !important;
        min-width: 44px !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .activities .activity-card .join-btn {
        -webkit-tap-highlight-color: transparent !important;
        min-height: 44px !important;
    }

    .topic-item.topic-pressed {
        transform: translateY(3px) scale(0.96) !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
        transition: all 0.1s ease !important;
    }

    .search-btn, .ai-search-btn {
        min-height: 44px;
    }

    .nav-arrow {
        min-width: 60px;
        min-height: 60px;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .header-box .logo .logo-img,
    .info-stats .info-icon,
    .search-btn img,
    .ai-search-btn .ai-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 打印样式 */
@media print {
    .header-box,
    .search-section,
    .footer,
    .nav-arrow,
    .user-actions {
        display: none !important;
    }

    .page-wrapper {
        box-shadow: none;
    }

    .subject-resources .resource-card,
    .course-card,
    .gallery-item,
    .activity-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    * {
        color: #000 !important;
        background: transparent !important;
    }
}

/* 学科资源课程面板切换样式 */
.resource-right {
    position: relative;
}

.course-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    transform: translateX(20px);
}

.course-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.course-panel .right-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.course-panel .right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-panel .dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.course-panel .right-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 30px;
}

/* 资源卡片点击状态过渡效果 */
.resource-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.resource-card:not(.selected) {
    opacity: 0.7;
}

.resource-card.selected {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 120, 215, 0.2);
}

.resource-card:hover:not(.selected) {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 响应式适配 */
@media (max-width: 992px) {
    .course-panel .right-content {
        padding: 20px 15px;
    }

    .course-panel {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .course-panel:not(.active) {
        display: none;
    }
}

@media (max-width: 768px) {
    .course-panel .right-content {
        padding: 15px 10px;
    }
}
