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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
    font-weight: 400;
    font-size: 12px;
    color: #999999;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}


/* ========== 顶部导航栏 ========== */

.top-header {
    height: 56px;
    background: #0C419A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
}

.top-header .logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.top-header .logs_img {
    height: 50px;
    width: auto;
    margin-left: 20px;
}

@media (max-width:750px) {
    .top-header .logs_img {
        height: 35px;
        width: auto;
        margin-left: 0;
    }
}

.top-nav-center {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 130px;
    /* position: absolute; */
    flex: 1;
    /* left: 50%; */
    /* transform: translateX(-50%); */
}

.top-nav-center a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    padding: 16px 0;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.top-nav-center a:hover {
    color: #FFBF00;
}

.top-nav-center a.active {
    color: #FFBF00;
    border-bottom-color: #FFBF00;
    font-weight: 600;
}

.top-header-right {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.top-header-right svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}


/* 移动端菜单按钮 */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}


/* 移动端全屏菜单样式 */

.mobile-full-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-full-menu.active {
    right: 0;
}

.mobile-menu-header {
    height: 56px;
    background: #0C419A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
}

.close-mobile-menu {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f0f2f5;
}

.mobile-top-nav-center {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-top-nav-center a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.mobile-top-nav-center a:last-child {
    border-bottom: none;
}

.mobile-top-nav-center a:hover,
.mobile-top-nav-center a.active {
    background: #0C419A;
    color: #FFBF00;
}

.mobile-sidebar-nav {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 15px;
    color: #3D3D3D;
    cursor: pointer;
    transition: background 0.2s;
    gap: 6px;
    border-bottom: 1px solid #eee;
}

.mobile-sidebar-nav .nav-item:last-child {
    border-bottom: none;
}

.mobile-sidebar-nav .nav-item:hover {
    background: #f5f5f5;
}

.mobile-sidebar-nav .nav-item.active {
    background: #0C419A;
    color: #FFBF00;
}

.mobile-sidebar-nav .nav-item .svg_icon {
    width: 17px;
    height: auto;
    filter: brightness(0) saturate(100%) invert(27%) sepia(0%) saturate(0%) hue-rotate(145deg) brightness(94%) contrast(87%);
    transition: filter 0.2s;
}

.mobile-sidebar-nav .nav-item.active .svg_icon {
    filter: brightness(0) saturate(100%) invert(64%) sepia(87%) saturate(606%) hue-rotate(338deg) brightness(104%) contrast(101%);
}

.mobile-sidebar-nav .nav-item .text {
    flex: 1;
}


/* 媒体查询：仅在移动端显示全屏菜单 */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    .mobile-full-menu {
        display: flex;
    }
    /* 隐藏原有的侧边栏 */
    .sidebar {
        display: none;
    }
    /* 隐藏原有的顶部菜单 */
    .top-nav-center {
        display: none;
    }
    /* 主内容区下移以避免被固定头部遮挡 */
    .layout {}
}


/* 桌面端隐藏全屏菜单 */

@media (min-width: 769px) {
    .mobile-full-menu {
        display: none;
    }
}


/* ========== 主体布局：侧边栏 + 内容区 ========== */

.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}


/* ========== 左侧边栏（白色） ========== */

.sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 15px;
    color: #3D3D3D;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    gap: 6px;
}

.nav-item:hover {
    background: #f5f5f5;
}

.nav-item .svg_icon {
    width: 17px;
    height: auto;
    filter: brightness(0) saturate(100%) invert(27%) sepia(0%) saturate(0%) hue-rotate(145deg) brightness(94%) contrast(87%);
    transition: filter 0.2s;
}

.nav-item.active .svg_icon {
    filter: brightness(0) saturate(100%) invert(64%) sepia(87%) saturate(606%) hue-rotate(338deg) brightness(104%) contrast(101%);
}

.nav-item.active {
    background: #0C419A;
    color: #FFBF00;
}


/* 图片图标样式，兼容使用 defaultIcon/activeIcon 图片 */

.nav-item .icon img {
    width: 18px;
    height: auto;
    display: block;
    object-fit: contain;
}

.nav-item .text {
    flex: 1;
}

.nav-item.has-children .arrow {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.nav-children {
    padding-left: 52px;
    padding-bottom: 4px;
}

.nav-children .nav-item {
    padding: 6px 20px 6px 0;
    font-size: 13px;
    color: #666;
}

.nav-children .nav-item.active {
    color: #1a56db;
    background: transparent;
    font-weight: 500;
}


/* ========== 主内容区 ========== */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 32px;
}

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

.section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.section-title .title-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.section-title .title-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}


/* 卡片网格：约 6 列 */

.card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: center;
    text-align: left;
    text-decoration: none;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.card-logo {
    width: 48px;
    height: 48px;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
    margin: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.3;
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.card-desc {
    font-size: 12px;
    color: #999;
    margin: 0;
    grid-column: 2;
    grid-row: 2;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-nav-center {
        display: none;
    }
}


/* ========== 课程页面样式 ========== */

.course-container {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.course-grid {
    display: grid;
    /* 默认：>1200px 三列 */
    grid-template-columns: repeat(3, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 50px;
    justify-content: center;
    align-items: start;
}


/* 700px - 1200px：两列 */

@media (max-width: 1200px) and (min-width: 701px) {
    .course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* <700px：一列（移动端） */

@media (max-width: 700px) {
    .course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-content: center;
        align-items: start;
    }
}

@media screen and (min-width: 1000px) and (max-width: 1720px) {
    .course-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
        justify-content: center;
        align-items: start;
    }
}

@media (min-width: 2000px) {
    .course-container {
        max-width: 1800px;
    }
    .course-grid {
        grid-template-columns: repeat(3, minmax(360px, 1fr));
        justify-content: center;
        align-items: start;
    }
}

.course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.course-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.5;
    width: 100%;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
}

.course-card:hover .thumbnail-img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.course-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #0C419A;
    font-weight: bold;
}

.course-info {
    padding: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.course-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.course-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.duration,
.level {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.duration {
    background: #e3f2fd;
    color: #1976d2;
}

.level {
    background: #f3e5f5;
    color: #7b1fa2;
}

.course-author {
    font-size: 13px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.course-author span {
    font-weight: 500;
}


/* 响应式设计 */

@media (max-width: 700px) {
    .course-container {
        padding: 16px;
    }
    .page-title {
        font-size: 20px;
    }
    .course-thumbnail {
        aspect-ratio: 1.5;
    }
}

@media (max-width: 480px) {
    .course-container {
        padding: 12px;
    }
    .course-info {
        padding: 16px;
    }
    .course-title {
        font-size: 16px;
    }
    .course-desc {
        font-size: 13px;
    }
}


/* ========== 联系页面样式 ========== */

.contact-container {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
    width: 100%;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header .page-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-content {
    display: flex;
    gap: 30px;
    flex-direction: column;
    align-items: center;
}

.contact-info {
    flex: 1;
}

.contact-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-card .section-title {
    font-size: 24px;
    margin-bottom: 24px;
    color: #333;
    text-align: center;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-icon {
    font-size: 24px;
    min-width: 32px;
    text-align: center;
    padding-top: 2px;
}

.info-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.info-content p {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.contact-qrcode {
    flex: 1;
    width: 500px;
}

@media (max-width: 768px) {
    .contact-qrcode {
        width: 95%;
    }
}

.qrcode-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 500px;
    height: 500px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-card .section-title {
    font-size: 20px;
    margin-bottom: 24px;
    color: #333;
}

.qrcode-wrapper {
    margin: 24px 0;
    padding: 20px;
    border-radius: 12px;
    display: inline-block;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qrcode-img {
    width: 200px;
    height: 200px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-text {
    font-size: 16px;
    color: #666;
    margin: 20px 0;
    line-height: 1.6;
}

.qrcode-tips {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

@media (max-width:800px) {
    .qrcode-card {
        width: 100%;
        height: auto;
    }
}

@media (min-width:2000px) {
    .qrcode-card {
        width: 650px;
        height: 650px;
    }
    .qrcode-img {
        width: 300px;
        height: 300px;
    }
}

.qrcode-tips p {
    font-size: 14px;
    color: #1976d2;
    margin: 8px 0;
    font-weight: 500;
}


/* 响应式设计 */

@media (max-width: 992px) {
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    .contact-qrcode {
        max-width: 100%;
    }
    .qrcode-img {
        width: 60%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .contact-container {
        padding: 16px;
    }
    .contact-header .page-title {
        font-size: 24px;
    }
    .page-subtitle {
        font-size: 16px;
    }
    .contact-card,
    .qrcode-card {
        padding: 24px;
    }
    .qrcode-img {
        width: 60%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 12px;
    }
    .contact-header .page-title {
        font-size: 24px;
    }
    .contact-card,
    .qrcode-card {
        padding: 20px;
    }
    .qrcode-img {
        width: 60%;
        height: auto;
    }
    .info-item {
        padding: 16px 0;
    }
    .info-content h3 {
        font-size: 16px;
    }
    .info-content p {
        font-size: 14px;
    }
}