
/* 页面全局样式设置 */
/* 使用响应式设计，确保在不同设备上的良好显示效果 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2E8B57 70%, #8B4513 25%, #FFA500 5%);
    color: #222;
    line-height: 1.6;
}

/* 设置导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(34, 34, 34, 0.8);
    padding: 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #FFA500;
}

/* 主内容区 */
.main-content {
    padding: 100px 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 36px;
    margin-top: 50px;
}

h2 {
    font-size: 28px;
    margin-top: 40px;
}

h3 {
    font-size: 24px;
    margin-top: 30px;
}

h4 {
    font-size: 20px;
    margin-top: 25px;
}

/* 段落样式 */
p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

/* 卡片式布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 300px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 16px rgba(0,0,0,0.2);
}

/* 图片样式 */
.card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card img:hover {
    transform: scale(1.05);
}

/* 按钮样式 */
.button {
    background-color: #FFA500;
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 25px;
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
}

.button:hover {
    background-color: #FF8C00;
    transform: scale(1.05);
}

.button:active {
    transform: scale(0.95);
}

/* 导航系统样式 */
.nav-section {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 165, 0, 0.9);
    padding: 10px;
    border-radius: 10px;
}

.nav-section a {
    display: block;
    margin: 10px 0;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.nav-section a:hover {
    text-decoration: underline;
}

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

    .card {
        width: 100%;
    }

    .nav-section {
        position: static;
        background: none;
        padding: 0;
    }

    .nav-section a {
        color: #222;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    p {
        font-size: 14px;
    }

    .button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes sway {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(2deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.tree {
    animation: sway 5s infinite;
}

@keyframes flutter {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f0f8ff;
}

.plant {
    width: 50px;
    height: 50px;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center/contain;
    animation: grow 3s infinite;
}

@keyframes grow {
    0% { background-image: url('https://images.gptkong.com/demo/sample1.png'); transform: scale(0.5); }
    50% { background-image: url('https://images.gptkong.com/demo/sample2.png'); transform: scale(1.0); }
    100% { background-image: url('https://images.gptkong.com/demo/sample3.png'); transform: scale(1.2); }
}

/* 高级选择器应用 */
.card-container .card:nth-child(even) {
    background-color: #f9f9f9;
}

.card-container .card:hover {
    border: 2px solid #FFA500;
}

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

thead {
    background-color: #228B22;
    color: #fff;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

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

tbody tr:hover {
    background-color: #e6ffe6;
}

/* 自定义选择框 */
.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    appearance: none;
    background: url('https://images.gptkong.com/demo/sample4.png') no-repeat right center;
    background-size: 20px;
    transition: border-color 0.3s;
}

.custom-select select:focus {
    border-color: #228B22;
    outline: none;
}

