/* 屏幕阅读器专用隐藏文本 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 站点公共导航与页脚：配色沿用原站点，不依赖服务端模板。 */
.site-shell,
.site-shell * {
    box-sizing: border-box;
}

.site-shell a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    color: #1D2939;
    transition: all 0.3s ease;
}

.site-navbar--solid,
.site-navbar.scrolled {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.site-navbar--dark {
    color: #fff;
    background-color: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.site-navbar--dark.scrolled {
    background-color: rgba(10, 10, 10, 0.96);
}

.site-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    color: #165DFF;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-logo img {
    display: block;
    width: auto;
    height: 40px;
    max-width: 100%;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav-link {
    font-weight: 500;
}

.site-nav-link:hover,
.site-nav-link[aria-current="page"] {
    color: #165DFF;
}

.site-language-link {
    color: #165DFF;
}


.site-nav-dropdown {
    position: relative;
    display: inline-block;
}

.site-dropdown-content {
    position: absolute;
    z-index: 1;
    display: none;
    min-width: 160px;
    padding: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.site-dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: #1D2939;
    white-space: nowrap;
}

.site-dropdown-content a:hover,
.site-dropdown-content a[aria-current="page"] {
    background-color: #f1f3f5;
}

.site-nav-dropdown:hover .site-dropdown-content,
.site-nav-dropdown:focus-within .site-dropdown-content {
    display: block;
}

.site-menu-btn {
    display: none;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
}

.site-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: #fff;
    color: #1D2939;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.site-mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.site-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}

.site-mobile-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.site-mobile-link:hover,
.site-mobile-link[aria-current="page"] {
    color: #165DFF;
}

/* 非首页为固定导航留出空间。 */
.site-shell-page {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 78px 0 0;
    display: block;
    text-align: initial;
}

.site-shell-page.menu-page {
    padding-bottom: 70px;
}

.game-stage {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 78px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.game-stage--narrow > * {
    width: 100%;
    max-width: 500px;
}

.game-stage--stacked {
    flex-direction: column;
}

.game-stage canvas {
    max-width: 100%;
    height: auto;
}

.game-stage > * {
    max-width: 100%;
}

.site-footer {
    padding: 4rem 0 2rem;
    color: #fff;
    background-color: #1D2939;
}

.site-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.site-footer-logo {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.5rem;
}

.site-footer-desc {
    margin: 0;
    color: #98A2B3;
}

.site-footer-title {
    margin: 0 0 1.5rem;
    color: #fff;
    font-size: 1.1rem;
}

.site-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.site-footer-link {
    color: #98A2B3;
}

.site-footer-link:hover {
    color: #fff;
}


.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    color: #98A2B3;
    border-top: 1px solid #344054;
}

.site-footer-bottom p {
    margin: 0;
    color: inherit;
}

@media (max-width: 768px) {
    .site-nav-links {
        display: none;
    }

    .site-menu-btn {
        display: block;
    }

    .site-footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .game-stage {
        align-items: flex-start;
        min-height: auto;
        padding: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1080px) {
    .site-nav-links {
        gap: 1rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 380px) {
    .site-container {
        width: 100%;
        padding: 0 16px;
    }
}
