@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --neon-green: #00ff41;
    --dark-bg: #0d1117;
    --panel-bg: #161b22;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--dark-bg);
    color: var(--neon-green);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.neon-text { text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green); }
.neon-box { box-shadow: 0 0 5px var(--neon-green), inset 0 0 5px var(--neon-green); }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.game-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    position: relative;
    background: #000;
    border: 2px solid var(--neon-green);
    touch-action: none;
}

.nav-item.active {
    background-color: rgba(0, 255, 65, 0.2);
    border-left: 4px solid var(--neon-green);
    color: #fff;
}

canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* 三消 Grid */
#match3Grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
    gap: 2px;
    background: #111;
}
.match3-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    background: #222;
    transition: transform 0.2s;
}
.match3-cell.selected {
    background: rgba(0, 255, 65, 0.3);
    border: 2px solid var(--neon-green);
}
.match3-cell.boom {
    animation: boom 0.3s ease-out forwards;
    background-color: #fff !important;
}
@keyframes boom {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.cursor::after { content: '|'; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

#modal-overlay { backdrop-filter: blur(5px); }
.msg-item:last-child { border-bottom: none; }

/* 游戏控制按钮样式 */
.game-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.1s;
    user-select: none;
}
.game-btn:active {
    background: var(--neon-green);
    color: black;
    transform: scale(0.95);
}
.game-btn-rect {
    border-radius: 8px;
    width: auto;
    padding: 0 20px;
}