
/* 页面通用样式 */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    background: linear-gradient(135deg, #031027, #09285a);
    overflow-x: hidden;
    animation: gradient-bg 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-bg {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

section {
    padding: 60px 20px;
    text-align: center;
}

h2, h3 {
    font-weight: bold;
    color: #50e6ff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(80, 230, 255, 0.8);
}

p {
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 30px;
}

a {
    color: #ffc107;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffa000;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #50e6ff;
}

/* 首页内容样式 */
#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 87, 34, 0.2), transparent 50%);
    animation: aurora-move 20s linear infinite alternate;
    pointer-events: none;
}

@keyframes aurora-move {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(100px) translateY(-50px);
    }
}

#hero h1 {
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

#hero p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ffc107;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #ffa000;
    transform: scale(1.05);
}

/* 特色模块样式 */
.feature-section {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 40px 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.feature-item h3 {
    color: #50e6ff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-shadow: 0 0 8px rgba(80, 230, 255, 0.8);
}

.feature-item p {
    color: #ccc;
}

.feature-item img {
    max-width: 80px;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* 示例文章样式 */
#example-article-section {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#example-article-section h2 {
    color: #ffc107;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 10px;
    margin-bottom: 30px;
    text-align: left;
}

#example-article-section h3 {
    color: #50e6ff;
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: left;
}

#example-article-section p {
    color: #eee;
    text-align: left;
    margin-bottom: 20px;
}

#example-article-section pre {
    background-color: #222;
    color: #eee;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto; /* 允许代码块横向滚动，但以下样式会尽量避免 */
    white-space: pre-wrap; /* 自动换行 */
    word-wrap: break-word; /* 长单词换行 */
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#example-article-section code {
    font-family: 'Courier New', Courier, monospace;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #888;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 自适应布局 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    section {
        padding: 40px 15px;
    }

    #hero h1 {
        font-size: 3em;
    }

    #hero p {
        font-size: 1.1em;
    }

    .feature-grid {
        grid-template-columns: 1fr; /* 移动端单列布局 */
    }

    .navbar-nav {
        gap: 10px;
    }

    .nav-link {
        font-size: 0.9em;
    }

    #example-article-section {
        padding: 20px 15px;
    }

    #example-article-section h2 {
        font-size: 1.8em;
    }
    #example-article-section h3 {
        font-size: 1.5em;
    }
    #example-article-section p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.5em;
    }
    .navbar-brand {
        font-size: 20px;
    }
    .navbar-nav {
        gap: 8px;
    }
    .nav-link {
        font-size: 0.8em;
    }
}

@media (max-width: 320px) {
    #hero h1 {
        font-size: 2em;
    }
    .navbar-brand {
        font-size: 18px;
    }
    .nav-link {
        font-size: 0.7em;
    }
}

