* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: white;
    overflow-x: hidden;
}

/* 首页样式 */
.hero-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: url('mountain-king.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.6), rgba(139,69,19,0.4));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.title {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ff4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px #ffd700, 0 0 30px #ff8c00, 0 0 40px #ff4500;
    }
    to {
        text-shadow: 0 0 30px #ffd700, 0 0 40px #ff8c00, 0 0 50px #ff4500;
    }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: #ffd700;
}

.enter-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff4500, #ff8c00);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255,69,0,0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255,69,0,0.6);
    background: linear-gradient(45deg, #ff6347, #ffa500);
}

.enter-btn:active {
    transform: translateY(-1px);
}

/* 游戏容器样式 */
.game-container {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    text-align: center;
}

.game-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #ffd700;
}

.game-info span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
}

.restart-btn, .back-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.restart-btn:hover, .back-btn:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.back-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.back-btn:hover {
    background: linear-gradient(45deg, #2980b9, #21618c);
}

/* 扫雷游戏板样式 */
.game-board {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    gap: 2px;
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255,215,0,0.3);
}

.cell {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    border: 2px solid #34495e;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.cell:hover {
    background: linear-gradient(45deg, #bdc3c7, #95a5a6);
    transform: scale(1.05);
}

.cell.revealed {
    background: linear-gradient(45deg, #ecf0f1, #bdc3c7);
    border-color: #95a5a6;
}

.cell.mine {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.cell.flagged {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.cell[data-count="1"] { color: #3498db; }
.cell[data-count="2"] { color: #27ae60; }
.cell[data-count="3"] { color: #e74c3c; }
.cell[data-count="4"] { color: #8e44ad; }
.cell[data-count="5"] { color: #e67e22; }
.cell[data-count="6"] { color: #16a085; }
.cell[data-count="7"] { color: #2c3e50; }
.cell[data-count="8"] { color: #7f8c8d; }

.hidden {
    display: none;
}

/* 图片选择器样式 */
.image-selector {
    margin-top: 30px;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    backdrop-filter: blur(10px);
}

.selector-title {
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.image-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-option {
    padding: 10px 15px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    border: 2px solid #ffd700;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.image-option:hover {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,215,0,0.4);
}

.image-option.active {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #2c3e50;
    box-shadow: 0 0 20px rgba(255,215,0,0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .image-options {
        flex-direction: column;
        align-items: center;
    }
    
    .image-option {
        width: 200px;
    }
    
    .game-board {
        grid-template-columns: repeat(8, 35px);
        grid-template-rows: repeat(8, 35px);
    }
    
    .cell {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

.lobby-container {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lobby-header {
    position: relative;
    background: rgba(0,0,0,0.7);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    text-align: center;
    border: 2px solid #ffd700;
}

.lobby-header h2 {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 30px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.lobby-games {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 30px;
}

.game-btn {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fffbe6 60%, #ffe4b3 100%);
    border-radius: 28px;
    margin: 8px;
    box-shadow: 0 4px 24px #ffd70022, 0 1.5px 8px #0001;
    font-size: 2.7rem;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    border: none;
    transition: box-shadow 0.22s, transform 0.22s, background 0.22s;
    overflow: visible;
    color: #222;
    outline: none;
}

.game-btn:hover, .game-btn:focus {
    box-shadow: 0 8px 36px #ffd70066, 0 2px 12px #0002;
    transform: translateY(-6px) scale(1.09);
    background: linear-gradient(135deg, #fffbe6 40%, #ffd700 100%);
}

.game-btn::before {
    display: block;
    margin: 0;
}

.btn-mine::before { content: '💣'; }
.btn-snake::before { content: '🐍'; }
.btn-2048::before { content: '2048'; font-size: 1.5rem; color: #ff8c00; font-weight: bold; }
.btn-tictactoe::before { content: '⭕❌'; font-size: 1.7rem; }
.btn-puzzle::before { content: '🧩'; }
.btn-mole::before { content: '🦫'; }
.btn-memory::before { content: '🃏'; }
.btn-tetris::before { content: '🟦🟧'; font-size: 1.5rem; }
.btn-gashapon::before { content: '🧸'; }

/* 悬浮时显示文字气泡 */
.game-btn[data-label]:hover::after, .game-btn[data-label]:focus::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%) translateY(14px);
    background: #222;
    color: #ffd700;
    padding: 7px 22px;
    border-radius: 14px;
    font-size: 1.08rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 18px #ffd70088;
    z-index: 10;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.2s;
    letter-spacing: 1px;
}

/* 返回首页按钮固定右上角 */
.back-btn {
    position: absolute;
    top: 18px;
    right: 32px;
    z-index: 20;
    padding: 10px 22px;
    font-size: 1.08rem;
    border-radius: 22px;
    background: linear-gradient(45deg, #3498db, #ffd700);
    color: #fff;
    font-weight: bold;
    border: none;
    box-shadow: 0 2px 12px #ffd70044;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.back-btn:hover {
    background: linear-gradient(45deg, #ffd700, #3498db);
    color: #222;
    box-shadow: 0 4px 18px #ffd70088;
}

.snake-board {
    display: grid;
    grid-template-columns: repeat(20, 20px);
    grid-template-rows: repeat(20, 20px);
    gap: 1px;
    background: #222;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #27ae60;
    box-shadow: 0 0 20px rgba(39,174,96,0.2);
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.snake-board .cell {
    width: 20px;
    height: 20px;
    background: #34495e;
    border-radius: 3px;
    margin: 0;
    box-sizing: border-box;
}

.game-2048-board {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    grid-template-rows: repeat(4, 60px);
    gap: 8px;
    background: #bbada0;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.cell-2048 {
    width: 60px;
    height: 60px;
    background: #cdc1b4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #776e65;
    transition: background 0.2s;
}

.cell-2 { background: #eee4da; color: #776e65; }
.cell-4 { background: #ede0c8; color: #776e65; }
.cell-8 { background: #f2b179; color: #fff; }
.cell-16 { background: #f59563; color: #fff; }
.cell-32 { background: #f67c5f; color: #fff; }
.cell-64 { background: #f65e3b; color: #fff; }
.cell-128 { background: #edcf72; color: #fff; }
.cell-256 { background: #edcc61; color: #fff; }
.cell-512 { background: #edc850; color: #fff; }
.cell-1024 { background: #edc53f; color: #fff; }
.cell-2048 { background: #edc22e; color: #fff; }

.game-icon {
    width: 36px;
    height: 36px;
    vertical-align: middle;
    margin-right: 10px;
    object-fit: contain;
}

.game-icon-btn {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 8px;
    object-fit: contain;
}

.game-btn {
    padding-top: 38px;
} 