/* ==========================================================================
   黄金矿工 (Gold Miner) 专有 CSS 样式
   遵循全站 V4.1 视觉标准与弹窗居中规范
   ========================================================================== */

/* 1. 游戏主体容器与画布 */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #0d0f12;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.game-area {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, #1a1e29 0%, #0a0c10 100%);
}

#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
    cursor: pointer;
}

#navbar {
    z-index: 10;
}

/* 2. 弹窗居中样式重写 (死组居中屏幕正中央) */
.overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2000 !important;
    margin: 0 !important;
}

/* 3. 过关商店专用弹窗居中卡片 */
#shop-screen {
    display: none;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(90vw, 820px);
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(12, 16, 24, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 255, 0.2);
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 28px;
    box-sizing: border-box;
}

.shop-header {
    text-align: center;
    margin-bottom: 20px;
}

.shop-header h2 {
    font-size: 26px;
    margin: 0 0 8px 0;
    color: #ffb700;
    text-shadow: 0 0 15px rgba(255, 183, 0, 0.4);
}

.shop-header p {
    font-size: 14px;
    color: #8a99ad;
    margin: 0;
}

.shop-items-container {
    display: flex;
    gap: 16px;
    max-width: 760px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.shop-item-card {
    background: rgba(26, 32, 48, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.shop-item-card:hover {
    border-color: rgba(0, 242, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 242, 255, 0.15);
}

.shop-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 242, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.shop-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.shop-item-desc {
    font-size: 12px;
    color: #8a99ad;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 34px;
}

.shop-item-price {
    font-size: 14px;
    font-weight: bold;
    color: #ffb700;
    margin-bottom: 12px;
}

.shop-buy-btn {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f2ff 0%, #00a2ff 100%);
    color: #050b14;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.shop-buy-btn:hover {
    opacity: 0.9;
}

.shop-buy-btn:active {
    transform: scale(0.96);
}

.shop-buy-btn.disabled {
    background: #2a3447;
    color: #5d6d85;
    cursor: not-allowed;
    opacity: 0.6;
}

.shop-footer-actions {
    display: flex;
    gap: 16px;
}

.next-level-btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: bold;
    color: #0d0f12;
    background: linear-gradient(135deg, #ffb700 0%, #ff8800 100%);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 183, 0, 0.4);
    transition: all 0.2s ease;
}

.next-level-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 25px rgba(255, 183, 0, 0.6);
}

/* 4. 提示信息 Floating Toast */
.game-toast {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 242, 255, 0.4);
    color: #00f2ff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
