:root {
    --primary-color: #0052CC;
    --primary-light: #4C9AFF;
    --primary-dark: #0747A6;
    --text-primary: #172B4D;
    --text-secondary: #5E6C84;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F5F7;
    --border-color: #DFE1E6;
    --hover-bg: #F4F5F7;
    --card-shadow: 0 4px 8px -2px rgba(9, 30, 66, 0.08), 0 0 1px rgba(9, 30, 66, 0.31);
    --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --header-bg: linear-gradient(to right, #1a237e, #1565c0);

    /* 统一的渐变背景色 */
    --gradient-bg: linear-gradient(135deg, rgba(76, 154, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);

    /* 页面背景 */
    --page-bg: #FAFBFC;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--page-bg);
    min-height: 100vh;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    z-index: 1000;
}

.main-nav {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s ease;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    padding: 6px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    color: #fff;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.user-icon {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.user-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* 主容器 */
.container {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    background: transparent;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px;
    gap: 24px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: var(--bg-primary);
    padding: 16px 0;
    position: sticky;
    top: 88px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(9, 30, 66, 0.08);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 112px);
    /* 设置固定高度 */
    overflow-y: auto;
}

/* 自定义滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(9, 30, 66, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(9, 30, 66, 0.3);
}

.sidebar ul {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px;
    margin-bottom: 4px;
}

.sidebar a:hover {
    color: var(--primary-color);
    background: rgba(76, 154, 255, 0.08);
}

.sidebar a.active {
    color: var(--primary-color);
    background: rgba(76, 154, 255, 0.12);
}

.sidebar a i {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: inherit;
    transition: transform 0.2s;
}

.sidebar a:hover i {
    transform: scale(1.1);
}

/* 主内容区 */
main {
    flex: 1;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 0;
    min-height: calc(100vh - 112px);
    /* 设置最小高度 */
    width: 100%;
    overflow-x: hidden;
}

section {
    margin-bottom: 0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    background: var(--bg-primary);
    border: 1px solid rgba(9, 30, 66, 0.08);
    transition: all 0.3s ease;
    scroll-margin-top: 88px;
    box-sizing: border-box;
    width: 100%;
}

section:hover {
    transform: translateY(-2px);
    border-color: rgba(76, 154, 255, 0.2);
    background: var(--gradient-bg), var(--bg-primary);
}

#common-ai,
#content-creation,
#image-ai,
#video-ai,
#efficiency-tools {
    background: var(--gradient-bg), var(--bg-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(9, 30, 66, 0.08);
}

.section-header .title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    font-size: 24px;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 154, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.08);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.more-link:hover {
    transform: translateX(4px);
}

/* 工具网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.tool-card-container {
    position: relative;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.tool-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-primary);
    height: 100%;
    min-height: 120px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.favorite-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.favorite-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #FFD700;
}

.favorites-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.favorites-btn i {
    margin-right: 5px;
    color: #FFD700;
}

.favorites-btn:hover {
    transform: translateY(-2px);
}

.no-favorites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
    border-color: var(--primary-light);
    background: var(--gradient-bg), var(--bg-primary);
    text-decoration: none;
}

.tool-card img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    padding: 8px;
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.1);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tool-card:hover img {
    transform: scale(1.1);
}

.tool-card .tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.tool-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding-right: 35px;
}

.tool-card h3 .title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.free-label {
    background-color: #4CAF50;
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.recommend-label {
    background: linear-gradient(135deg, #ff9800, #ff6d00);
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 5px;
}

.tool-card p {
    margin: 0;
    font-size: 13px;
    color: #000;
    line-height: 1.5;
    overflow: visible;
    text-overflow: unset;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: normal;
}

/* 页脚 */
footer {
    background: var(--header-bg);
    /* 使用与头部相同的渐变背景 */
    padding: 48px 24px 24px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* 更改边框颜色 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
    padding: 0 24px;
}

.about {
    max-width: 360px;
}

.about h3 {
    color: #fff;
    /* 改为白色 */
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.about p {
    color: rgba(255, 255, 255, 0.85);
    /* 改为半透明白色 */
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.quick-links h3 {
    color: #fff;
    /* 改为白色 */
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    grid-column: 1 / -1;
}

.quick-links ul {
    list-style: none;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links a {
    color: rgba(255, 255, 255, 0.85);
    /* 改为半透明白色 */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.quick-links a:hover {
    color: #fff;
    /* 悬停时改为纯白色 */
}

.copyright {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* 更改边框颜色 */
    color: rgba(255, 255, 255, 0.85);
    /* 改为半透明白色 */
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 1480px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 添加中等屏幕的响应式设计 */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 16px;
        overflow-x: hidden;
    }

    main {
        padding: 0;
        overflow-x: hidden;
    }

    section {
        width: 100%;
        max-width: 100%;
        padding: 16px;
        overflow: hidden;
    }

    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        overflow: hidden;
    }

    .tool-card {
        padding: 12px;
        min-height: 100px;
    }

    .tool-card img {
        width: 40px;
        height: 40px;
    }

    .tool-card h3 {
        font-size: 14px;
        padding-right: 30px;
    }

    .tool-card p {
        font-size: 12px;
    }

    .favorite-btn {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 12px;
    }

    .nav-links {
        display: none;
    }

    .search-box {
        width: 160px;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        max-height: none;
    }

    main {
        min-height: auto;
        width: 100%;
        overflow-x: hidden;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 32px 16px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0;
    }

    .about {
        max-width: none;
    }

    .quick-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .copyright {
        margin-top: 32px;
        padding-top: 16px;
    }
}

/* 添加竖屏模式的特殊处理 */
@media (max-width: 576px) {
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 8px;
        overflow-x: hidden;
        width: 100%;
    }

    main {
        width: 100%;
        overflow-x: hidden;
    }

    section {
        padding: 12px;
        margin-bottom: 16px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .section-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .section-header i {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .tool-grid {
        gap: 12px;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .tool-card-container {
        width: 100%;
    }

    .tool-card {
        padding: 10px;
        gap: 10px;
        width: 100%;
    }

    .tool-card img {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .tool-card h3 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .free-label,
    .recommend-label {
        font-size: 10px;
        padding: 1px 4px;
    }

    .tool-card p {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* 针对极窄屏幕的优化 */
@media (max-width: 360px) {
    .tool-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tool-card .tool-info {
        width: 100%;
    }

    .tool-card h3 {
        justify-content: center;
        flex-wrap: wrap;
        padding-right: 0;
    }

    .favorite-btn {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* Course Learning Section Styles */
.course-categories {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #f5f5f5;
}

.category-btn.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
    border-color: var(--primary-light);
    background: var(--gradient-bg), var(--bg-primary);
}

.course-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

.course-level {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.course-info {
    padding: 15px;
}

.course-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.course-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
    margin-bottom: 15px;
}

.course-meta span i {
    margin-right: 5px;
}

.course-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    color: #f56c6c;
    font-size: 20px;
    font-weight: bold;
}

.enroll-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.enroll-btn:hover {
    background: #1557b0;
    text-decoration: none;
}

/* 右侧声明弹窗 */
.modal-suspension {
    position: fixed;
    top: 84px;
    right: 7px;
    width: 120px;
    /* 增加宽度以容纳内容和关闭按钮 */
    padding: 10px;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 1px solid rgba(9, 30, 66, 0.08);
    transform: translateX(0);
    /* 确保初始可见 */
}


.modal-suspension_notice {
    font-size: 13px;
    gap: 6px;
    border-bottom: 1px solid rgba(9, 30, 66, 0.08);
    display: flex;
    justify-content: start;
    align-items: center;
    margin: 5px 0;
    
}

.modal-suspension_container {
    position: relative;
    width: 100%;
    height: 100%;
}

.modal-suspension_content {
    /* padding-right: 30px; 为关闭按钮预留空间 */
    font-size: 11px;
    line-height: 1.3;
    color: #333;
    text-align: justify;
    margin: 5px 0;

}

.modal-suspension_close {
    position: absolute;
    right: -20px;
    top: -30px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: none;
    font-size: 22px;
    font-weight: bold;

    transition: color 0.2s;
}

.modal-suspension_close:hover {
    color: #666;
}

/* 悬停时显示关闭按钮 */
.modal-suspension:hover .modal-suspension_close {
    display: block;
}