
/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #228B22, #0074D9);
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 0;
    background: rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 50% 20%;
    border-bottom-right-radius: 50% 20%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3em;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 导航栏 */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ff77ff;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #ff77ff;
}

/* 主内容区域 */
main {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

main h2, main h3, main h4 {
    color: #228B22;
}

main pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

main code {
    color: #d63384;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #0074D9;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* 图片样式 */
img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

/* 按钮样式 */
button {
    background-color: #0074D9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

button:active {
    transform: scale(0.9);
}

/* 示例展示区 */
.sample-display {
    border: 2px dashed #ff77ff;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    margin-top: 30px;
}

.sample-display h2 {
    color: #ff77ff;
    text-align: center;
}

.sample-display pre {
    background: #e0f7fa;
    border-left: 5px solid #0074D9;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.5em;
    }
}

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

@media (max-width: 1024px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 20px;
    }

    header {
        padding: 30px 0;
    }

    header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    nav a {
        font-size: 0.9em;
    }

    main h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 320px) {
    nav a {
        font-size: 0.8em;
    }

    header h1 {
        font-size: 1.5em;
    }
}

/* 动画效果 */
.icon {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* 提示文字 */
.footer-note {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    padding: 10px 0;
}

/* 自定义滚动条 */
main::-webkit-scrollbar {
    width: 8px;
}

main::-webkit-scrollbar-thumb {
    background: #0074D9;
    border-radius: 4px;
}

main::-webkit-scrollbar-track {
    background: #f1f1f1;
}

