/* Snake Game Modal Styles */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.game-modal.active {
    opacity: 1;
    pointer-events: all;
}

.game-container {
    background: #1e1e1e;
    padding: 2px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(126, 59, 237, 0.4);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-modal.active .game-container {
    transform: scale(1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2d2d2d;
    border-bottom: 2px solid #333;
    border-radius: 10px 10px 0 0;
}

.game-title {
    color: var(--primary-light);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-score {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

.game-close-btn {
    background: none;
    border: none;
    color: #ff5f56;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-close-btn:hover {
    transform: scale(1.1);
}

#snakeCanvas {
    background: #000;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: block;
}

.game-controls-hint {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #888;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.key-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #333;
    border-radius: 4px;
    border: 1px solid #555;
    margin: 0 2px;
    font-size: 0.8rem;
}

/* Play Button Styling */
.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    /* Ensure it looks like a button */
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(126, 59, 237, 0.4);
}

.play-btn i {
    font-size: 0.9em;
}