
/* 基本样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1E90FF 70%, #32CD32 25%, #FFA500 5%);
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(30, 144, 255, 0.9);
    padding: 20px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar .logo {
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
.navbar .menu {
    display: flex;
    gap: 30px;
}
.navbar .menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}
.navbar .menu a:hover {
    color: #FFA500;
}
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: all 0.3s ease;
}
/* 响应式导航栏 */
@media (max-width: 768px) {
    .navbar .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(30, 144, 255, 0.9);
        position: absolute;
        top: 70px;
        left: 0;
    }
    .navbar .menu.active {
        display: flex;
    }
    .hamburger {
        display: flex;
    }
}

/* 首页横幅 */
.hero {
    height: 100vh;
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 80px;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 144, 255, 0.5);
}
.hero-content {
    position: relative;
    color: #fff;
    text-align: center;
    z-index: 1;
}
.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
}
.hero-content .button {
    background-color: #FFA500;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.hero-content .button:hover {
    background-color: #e69500;
}

/* 章节导航 */
.sidebar {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 200px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul li {
    margin-bottom: 15px;
}
.sidebar ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: color 0.3s ease;
}
.sidebar ul li a:hover {
    color: #FFA500;
}
/* 内容区块 */
.section {
    padding: 60px 40px;
    margin-left: 240px;
}
.section:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.8);
}
.section h2, .section h3, .section h4 {
    color: #1E90FF;
}
.section p {
    font-size: 16px;
    margin-bottom: 20px;
}
.section img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
/* 代码块样式 */
.code-block {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.code-block pre {
    margin: 0;
}
.code-block code {
    font-family: 'Courier New', Courier, monospace;
    color: #d14;
}

/* 底部样式 */
.footer {
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer .social a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.footer .social a:hover {
    color: #FFA500;
}
.footer .language-switcher button {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.footer .language-switcher button:hover {
    background-color: rgba(255, 165, 0, 0.2);
}

/* 加载动画 */
.loader {
    border: 8px solid rgba(245, 245, 245, 0.3);
    border-top: 8px solid #1E90FF;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 按钮悬停效果 */
button:hover {
    background-color: #e69500;
    color: #fff;
}

/* 3D 变换 */
.card {
    perspective: 1000px;
}
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.card:hover .card-inner {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}
.card-front {
    background-color: #fff;
    color: #333;
}
.card-back {
    background-color: #1E90FF;
    color: #fff;
    transform: rotateY(180deg);
}

