/* ========================================
   Module: Games (游戏中心) - CSS
   ======================================== */

.games-money {
    display: flex; align-items: center; gap: 6px;
    font-size: 16px; font-weight: 700; color: #ff9800;
}

/* 游戏大厅 */
.games-lobby { flex: 1; overflow-y: auto; padding: 16px; }
.games-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.game-card {
    background: #fff; border-radius: 16px; padding: 20px 14px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s; position: relative;
    overflow: hidden;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.game-card:active { transform: scale(0.97); }
.game-card-icon { font-size: 40px; }
.game-card-name { font-size: 15px; font-weight: 700; color: var(--text-color); }
.game-card-desc { font-size: 11px; color: #999; text-align: center; line-height: 1.4; }
.game-card-reward {
    font-size: 10px; color: #ff9800; background: #fff3e0;
    padding: 3px 8px; border-radius: 8px; font-weight: 600;
}

/* 游戏画面 */
.games-play-screen {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #1a1a2e; z-index: 60; display: none;
    flex-direction: column; color: #fff;
}
.games-play-screen.active { display: flex; }
.games-play-header {
    display: flex; align-items: center; padding: 12px 16px; gap: 12px;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(10px);
    flex-shrink: 0; z-index: 2;
}
.games-play-title { flex: 1; font-size: 16px; font-weight: 700; }
.games-play-score { font-size: 14px; color: #FFD700; font-weight: 600; }
.games-play-best { font-size: 11px; color: rgba(255,255,255,0.5); }
.games-play-close {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.games-home-btn {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 8px; font-size: 16px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.games-home-btn:hover { background: rgba(255,255,255,0.3); }
.games-home-btn:active { transform: scale(0.9); }
.games-canvas-wrap {
    flex: 1; display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.games-canvas-wrap canvas {
    max-width: 100%; max-height: 100%; touch-action: none;
}

/* 游戏结束弹窗 */
.games-over-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); display: flex; align-items: center;
    justify-content: center; z-index: 70; opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.games-over-overlay.visible { opacity: 1; pointer-events: auto; }
.games-over-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px; padding: 32px 24px; width: 85%; max-width: 300px;
    text-align: center; color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: rewardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes rewardPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.games-over-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.games-over-score { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.games-over-score span { color: #FFD700; font-weight: 700; font-size: 18px; }
.games-over-best { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.games-over-coin {
    font-size: 36px; font-weight: 800; color: #FFD700;
    text-shadow: 0 0 15px rgba(255,215,0,0.3); margin-bottom: 24px;
}
.games-over-coin::before { content: '🪙 '; font-size: 28px; }
.games-over-btns { display: flex; gap: 10px; }
.games-over-btns button {
    flex: 1; padding: 14px; border: none; border-radius: 14px;
    font-size: 15px; font-weight: 700; cursor: pointer; transition: transform 0.15s;
}
.games-over-btns button:active { transform: scale(0.95); }
.games-over-btns .retry-btn { background: linear-gradient(135deg, #FFD700, #FFA500); color: #1a1a2e; }
.games-over-btns .back-btn { background: rgba(255,255,255,0.1); color: #fff; }

/* 老虎机特殊样式 */
.slot-controls {
    display: flex; gap: 10px; padding: 12px 16px;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(10px); flex-shrink: 0;
    align-items: center; justify-content: center;
}
.slot-bet-btn {
    padding: 10px 18px; border: none; border-radius: 12px;
    background: rgba(255,255,255,0.15); color: #fff; font-size: 14px;
    font-weight: 600; cursor: pointer;
}
.slot-bet-btn.active { background: var(--primary-color); }
.slot-spin-btn {
    padding: 12px 40px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e; font-size: 18px; font-weight: 800; cursor: pointer;
    transition: transform 0.15s;
}
.slot-spin-btn:active { transform: scale(0.95); }
.slot-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }
