
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0F204B 70%, #E0E5EC 25%, #3CB878 5%);
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(15, 32, 75, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar a {
    color: #E0E5EC;
    text-decoration: none;
    font-size: 16px;
    position: relative;
}

.navbar a:hover {
    color: #3CB878;
    transition: color 0.3s ease;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: #0F204B;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #E0E5EC;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 80px 40px 40px 40px;
}

.article {
    background: rgba(224, 229, 236, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.article h2, .article h3 {
    font-family: 'Montserrat', sans-serif;
    color: #0F204B;
}

.article pre {
    background: #1E1E1E;
    color: #C5C5C5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article code {
    font-family: 'Courier New', monospace;
    color: #FFD700;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.image-gallery img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* 提示文字样式 */
.prompt {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #3CB878;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar a {
        font-size: 14px;
    }

    .prompt {
        font-size: 18px;
    }
}

/* 代码示例样式 */
.code-example {
    background: #f5f5f5;
    padding: 15px;
    border-left: 5px solid #6A11CB;
    margin: 20px 0;
    border-radius: 5px;
}

.code-example code {
    background: #e0e0e0;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #3CB878;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
}

.active, .collapsible:hover {
    background-color: #2A7A58;
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 加载动画样式 */
.loader {
    border: 8px solid #E0E5EC;
    border-top: 8px solid #3CB878;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 悬浮按钮样式 */
.voice-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #6A11CB;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.voice-assistant:hover {
    background: #3CB878;
    transform: scale(1.1);
}

