
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #87CEEB, #90EE90);
    background-size: 200% 200%;
    animation: gradient-animation 10s ease infinite;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* 渐变动画 */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 头部样式 */
header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #90EE90, #87CEEB);
    border-radius: 15px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3em;
    color: #2F4F4F;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    color: #696969;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFD700; /* 金属黄 */
}

/* 主要内容 */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 文章样式 */
article {
    flex: 2 1 600px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
}

article h2, article h3, article h4 {
    color: #2F4F4F;
    margin-bottom: 15px;
}

article p {
    margin-bottom: 15px;
}

article pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 侧边栏 */
aside {
    flex: 1 1 300px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
}

aside h3 {
    margin-bottom: 15px;
    color: #2F4F4F;
}

aside ul {
    list-style: none;
}

aside ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

aside ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #32CD32;
}

aside a {
    color: #008B8B;
    text-decoration: none;
    transition: color 0.3s ease;
}

aside a:hover {
    color: #FF69B4; /* 霓虹紫 */
}

/* 图像样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 按钮样式 */
.button {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background: #32CD32;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s ease;
}

.button:hover {
    background: #228B22;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
    opacity: 0;
}

.button:hover::before {
    width: 200px;
    height: 200px;
    opacity: 1;
}

@keyframes ripple {
    0% { width: 0; height: 0; opacity: 0.5; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* 提示文字 */
.reference {
    text-align: center;
    font-size: 1em;
    color: #696969;
    margin-top: 20px;
}

/* 代码块样式 */
.code-block {
    background: #2E8B57;
    color: #FFFFFF;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

/* 响应式设计 */

/* 小尺寸手机 */
@media (max-width: 320px) {
    header h1 {
        font-size: 2em;
    }

    .navbar a {
        margin: 0 5px;
        font-size: 0.9em;
    }

    article, aside {
        flex: 1 1 100%;
    }
}

/* 大尺寸手机 */
@media (min-width: 321px) and (max-width: 480px) {
    header h1 {
        font-size: 2.5em;
    }

    .navbar a {
        margin: 0 8px;
        font-size: 1em;
    }
}

/* 竖屏平板 */
@media (min-width: 481px) and (max-width: 768px) {
    header h1 {
        font-size: 3em;
    }

    .navbar a {
        margin: 0 10px;
        font-size: 1.1em;
    }
}

/* 中等屏幕，重点适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    header h1 {
        font-size: 3.5em;
    }

    .navbar a {
        margin: 0 12px;
        font-size: 1.2em;
    }

    main {
        flex-wrap: wrap;
    }
}

/* 桌面显示器 */
@media (min-width: 1025px) and (max-width: 1200px) {
    header h1 {
        font-size: 4em;
    }

    .navbar a {
        margin: 0 15px;
        font-size: 1.3em;
    }
}

/* 大尺寸桌面显示器 */
@media (min-width: 1201px) {
    header h1 {
        font-size: 4.5em;
    }

    .navbar a {
        margin: 0 18px;
        font-size: 1.4em;
    }

    main {
        flex-wrap: nowrap;
    }
}

