﻿body {
    margin: 0;
    background: #f6f6f6;
    font-family: "微软雅黑",Arial,sans-serif;
}

.header {
    display: flex;
    align-items: center;
    background: #2a71fd;
    color: #fff;
    padding: 0 30px;
    height: 56px;
    position: relative;
}

.header-left {
    width: 220px; /* 和.sidebar一致 */
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;

}
#molecule-frame {
    width: 100vw;
    height: 500px; /* 或你希望的高度，可自调 */
    border: none;
    display: block;
}
.logo {
    height: 36px;
}

.header-game-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 17px;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    margin-left: 6px;
    transition: background .16s;
}

    .header-game-link:hover {
        background: #fff;
        color: #2a71fd;
    }

.userinfo {
    margin-left: auto;
    text-align: right;
}


.container {
    display: flex;
    min-height: calc(100vh - 52px);
}

.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #eee;
    padding-top: 24px;
    transition: all .25s;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;

}

    .menu-list li {
        padding: 13px 32px;
        font-size: 16px;
        color: #222;
        cursor: pointer;
        border-left: 3px solid transparent;
        transition: background .15s, border-color .15s;
        flex: 1 1 160px; /* 每项最小宽度160px，宽屏可自动铺满，窄屏可换行 */
        min-width: 120px; /* 最窄多少不挤破 */
    }

        .menu-list li.active,
        .menu-list li:hover {
            background: #f0f6ff;
            color: #2a71fd;
            border-left: 3px solid #2a71fd;
            font-weight: bold;
        }

.main-content {
    flex: 1;
    padding: 40px 30px;
    background: #f8fafc;
    min-width: 0; /* 防止内容过窄 */
}

/* 手机端菜单横条 */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 0;
    }

    .menu-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        border-bottom: 1px solid #eee;
        background: #fff;
    }

        .menu-list li {
            min-width: 120px;
            padding: 12px 10px;
            border-left: none;
            border-bottom: 2px solid transparent;
            white-space: nowrap;
        }

            .menu-list li.active,
            .menu-list li:hover {
                background: #f0f6ff;
                border-bottom: 2px solid #2a71fd;
                color: #2a71fd;
                border-left: none;
                font-weight: bold;
            }

    .main-content {
        padding: 18px 8px;
    }
}

@media (max-width: 500px) {
    .header {
        padding: 7px 6px;
        min-height: 38px;
    }

    .main-content {
        padding: 10px 2px;
    }

    .menu-list li {
        min-width: 90px;
        font-size: 14px;
    }
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 18px;
}

@media (max-width: 900px) {
    .site-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .site-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.site-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px #eee;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    transition: .16s;
}

    .site-card:hover {
        box-shadow: 0 6px 24px #dde4f8;
    }

.site-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #295fff;
    margin-bottom: 7px;
    text-decoration: underline;
    cursor: pointer;
}

.site-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

    .site-meta strong {
        color: #333;
    }

.site-desc {
    color: #444;
    font-size: 14px;
    margin-top: 10px;
}

 



