/* 游戏容器 */
.game-container {
    position: absolute;
    top: 140px; /* 关键修改：从80px增加到140px */
    left: 0;
    width: 100%;
    height: calc(100% - 240px);
    pointer-events: none;
    /* debug: border: 1px solid red; */
}

/* 标题样式 - 增加一点背景渐变确保文字清晰 */
.game-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 20px;
    text-align: center;
    z-index: 50;
    pointer-events: none;
}

/* 音乐按钮：右上角 */
.music-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s, background 0.2s;
}
.music-toggle:active {
    transform: scale(0.9);
}

/* 卡片 */
.card {
    width: 48px;
    height: 56px;
    background: #fff;
    border-radius: 8px;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card.disabled {
    filter: brightness(0.4) grayscale(0.5);
    cursor: default;
}

/* 底部槽位 */
.dock-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 366px;
    height: 72px;
    background: #4a3024;
    border: 4px solid #2d1c15;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 999;
    box-sizing: border-box;
}

/* 开始封面 */
.start-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 结算弹窗 */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(to bottom, #4ade80, #22c55e);
    border-bottom: 4px solid #15803d;
    color: white;
    font-weight: bold;
    padding: 12px 32px;
    border-radius: 999px;
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.2s, background 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:active {
    transform: scale(0.9);
}

/* 动画效果 */
.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes bounceIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.vanish {
    animation: vanishAnim 0.2s ease-in forwards;
}
@keyframes vanishAnim {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.music-toggle {
    transition: transform 0.2s, background 0.2s;
}
.music-toggle:active {
    transform: scale(0.9);
}