/* 导航栏样式 */

.logo {
    margin-right: 1rem;
}
.nav-title {
    margin-right: 2rem;
}
.breadcrumb {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #4a90e2;
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: 500;
}

/* Override link color in dark mode to match light mode behavior */
body.dark .breadcrumb a {
    color: #666;
}

body.dark .breadcrumb a:hover {
    color: var(--link-hover-color);
}


.nav-title h1 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.logo a {
    font-size: 1.8rem;
    color: #333;
    text-decoration: none;
}

.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 1rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #4a90e2;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #4a90e2;
    transition: width 0.3s;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.language-switch {
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle i {
    margin: 0 0.3rem;
    cursor: pointer;
    font-size: 1.2rem;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容区域样式 */
.game-content {
    padding:  0;
    max-width: 100%;
    margin: 0 auto;
}

.game-content h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

/* 按钮样式 */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    margin: 0.5rem;
}

.primary-btn {
    background-color: #4a90e2;
    color: white;
}

.primary-btn:hover {
    background-color: #3a7bc8;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-title h1 {
        font-size: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        transition: left 0.3s;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links ul {
        flex-direction: column;
        padding: 2rem;
    }

    .nav-links li {
        margin: 1rem 0;
    }

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

    .game-content {
        padding: 2rem 1rem;
    }

    .game-content h1 {
        font-size: 2rem;
    }
}

/* ========== 公共导航栏与主内容的样式在 main.css 中，以下主要针对游戏页面 ========== */

/* 主游戏容器 */
.game-container {
    position: relative;
    width: 100%;
    height: 550px;
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 12px !important;
    border-top: none; /* Remove top border */
    background-color: #222;
    overflow: hidden; /* 防止内容溢出 */
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* 或者直接用 drawImage 绘制背景 */
    object-fit: cover;
    border-radius: 12px !important;
}

/* 坐标轴面板 */
.control-axis {
    margin: 0;
    text-align: center;
    padding: 0 2rem;
    background-color: var(--card-bg);
    border-radius: 12px !important;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.control-axis svg {
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
}


.control-axis svg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#axisCanvas {
    border: 1px solid #aaa;
    background-color: #fff;
    border-radius: 12px !important;
}


/* 音乐控制按钮样式 */
.music-control {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

/* 音乐控制按钮悬停效果 */
.music-control:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}

/* 音乐控制按钮点击效果 */
.music-control:active {
    transform: scale(0.95);
}
/* 面包屑音乐控制按钮样式 */
.breadcrumb-music-control {
    color: #4a90e2;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.breadcrumb-music-control:hover {
    text-decoration: underline;
}

/* 面包屑布局调整为弹性布局 */
.breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

/* 使原有面包屑内容保持在左侧 */
.breadcrumb > *:not(.breadcrumb-music-control) {
    margin-right: 5px;
}

/* 移动设备提示覆盖层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    color: white;
}

.mobile-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
}

.mobile-overlay p {
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 80%;
}

.mobile-overlay .icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: #4a90e2;
}

.continue-anyway-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.continue-anyway-btn:hover {
    background-color: #3a7bc8;
}

/* 适应黑暗模式 */
body.dark .mobile-overlay {
    background-color: rgba(0, 0, 0, 0.9);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .mobile-overlay {
        display: flex;
    }

    /* 游戏容器在显示覆盖层时隐藏滚动 */
    body.mobile-warning-active {
        overflow: hidden;
    }

    /* 平板设备可能需要调整 */
    @media (min-width: 600px) {
        .mobile-overlay h2 {
            font-size: 2rem;
        }

        .mobile-overlay p {
            font-size: 1.2rem;
        }
    }
}


