/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.desktop-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: #3498db;
}

.content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #7f8c8d;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: #ecf0f1;
    margin-top: 50px;
}

/* 移动端菜单按钮 - 默认隐藏 */
.mobile-menu-button {
    display: none;
    position: relative;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
}

.mobile-menu-button span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: #2c3e50;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-button span:nth-child(1) {
    top: 0;
}

.mobile-menu-button span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-button span:nth-child(3) {
    bottom: 0;
}

/* 激活状态的菜单按钮 */
.mobile-menu-button.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 10px;
}

/* 移动端菜单遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* 移动端菜单内容 */
.mobile-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateY(0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.menu-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.close-button {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:hover {
    color: #e74c3c;
    background-color: #f8f9fa;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.menu-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.menu-icon {
    font-size: 28px;
    margin-bottom: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e3f2fd;
    border-radius: 50%;
    color: #3498db;
}

.menu-text {
    font-size: 0.9rem;
    color: #2c3e50;
    text-align: center;
    font-weight: 500;
}

/* 媒体查询：仅在移动设备和平板上显示菜单 */
@media (max-width: 1024px) {
    .mobile-menu-button {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-menu-content {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }
    
    .mobile-menu-overlay.active .mobile-menu-content {
        transform: translateX(-50%) translateY(0);
    }
    
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 手机设备优化 */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content h1 {
        font-size: 2rem;
    }
}

/* PC端完全隐藏菜单相关元素 */
@media (min-width: 1025px) {
    .mobile-menu-button,
    .mobile-menu-overlay {
        display: none !important;
    }
}
